ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:48118] [ruby-trunk - Bug #9769] [Open] un-infection in StringIO#write
       [not found] <redmine.issue-9769.20140422115158@ruby-lang.org>
@ 2014-04-22 11:51 ` snowjail
  2014-04-22 13:47 ` [ruby-dev:48119] [ruby-trunk - Bug #9769] " shyouhei
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: snowjail @ 2014-04-22 11:51 UTC (permalink / raw
  To: ruby-dev

Issue #9769 has been reported by 宗介 相良.

----------------------------------------
Bug #9769: un-infection in StringIO#write
https://bugs.ruby-lang.org/issues/9769

* Author: 宗介 相良
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [amd64-freebsd10]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
StringIO#write において、汚染された文字列を与えても汚染状態が伝播しません。

* 文字列の拡張を伴わない書き込み (こちらは伝播する)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

* 文字列の拡張を伴う書き込み (こちらが伝播しない)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>false, :sio=>false}

内部文字列オブジェクトに伝播されたほうが好ましいと思います。

確認した限りでは 1.9.3、2.0.0、2.1.1 の挙動が同じとなっています。

添付いたしましたパッチの適用で、与えられた文字列の汚染状態を伝播するようになります。

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

よろしくお願いします。

---Files--------------------------------
stringio_infect.patch (485 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-dev:48119] [ruby-trunk - Bug #9769] un-infection in StringIO#write
       [not found] <redmine.issue-9769.20140422115158@ruby-lang.org>
  2014-04-22 11:51 ` [ruby-dev:48118] [ruby-trunk - Bug #9769] [Open] un-infection in StringIO#write snowjail
@ 2014-04-22 13:47 ` shyouhei
  2014-04-22 14:14 ` [ruby-dev:48120] [ruby-trunk - Bug #9769] [Closed] " nobu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: shyouhei @ 2014-04-22 13:47 UTC (permalink / raw
  To: ruby-dev

Issue #9769 has been updated by Shyouhei Urabe.


念のため: このバグ報告はsecurity@ruby-lang•orgに送られていたものですが、中の人たちの判断によりこちらにて議論されることになりました。

----------------------------------------
Bug #9769: un-infection in StringIO#write
https://bugs.ruby-lang.org/issues/9769#change-46291

* Author: 宗介 相良
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [amd64-freebsd10]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
StringIO#write において、汚染された文字列を与えても汚染状態が伝播しません。

* 文字列の拡張を伴わない書き込み (こちらは伝播する)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

* 文字列の拡張を伴う書き込み (こちらが伝播しない)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>false, :sio=>false}

内部文字列オブジェクトに伝播されたほうが好ましいと思います。

確認した限りでは 1.9.3、2.0.0、2.1.1 の挙動が同じとなっています。

添付いたしましたパッチの適用で、与えられた文字列の汚染状態を伝播するようになります。

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

よろしくお願いします。

---Files--------------------------------
stringio_infect.patch (485 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-dev:48120] [ruby-trunk - Bug #9769] [Closed] un-infection in StringIO#write
       [not found] <redmine.issue-9769.20140422115158@ruby-lang.org>
  2014-04-22 11:51 ` [ruby-dev:48118] [ruby-trunk - Bug #9769] [Open] un-infection in StringIO#write snowjail
  2014-04-22 13:47 ` [ruby-dev:48119] [ruby-trunk - Bug #9769] " shyouhei
@ 2014-04-22 14:14 ` nobu
  2014-07-02  7:13 ` [ruby-dev:48361] [ruby-trunk - Bug #9769] " usa
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: nobu @ 2014-04-22 14:14 UTC (permalink / raw
  To: ruby-dev

Issue #9769 has been updated by Nobuyoshi Nakada.

Status changed from Open to Closed
% Done changed from 0 to 100

Applied in changeset r45670.

----------
stringio.c: use rb_str_append

* ext/stringio/stringio.c (strio_write): use rb_str_append to
  reuse coderange bits and keep taintedness.
  [ruby-dev:48118] [Bug #9769]

----------------------------------------
Bug #9769: un-infection in StringIO#write
https://bugs.ruby-lang.org/issues/9769#change-46292

* Author: 宗介 相良
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [amd64-freebsd10]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
StringIO#write において、汚染された文字列を与えても汚染状態が伝播しません。

* 文字列の拡張を伴わない書き込み (こちらは伝播する)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

* 文字列の拡張を伴う書き込み (こちらが伝播しない)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>false, :sio=>false}

内部文字列オブジェクトに伝播されたほうが好ましいと思います。

確認した限りでは 1.9.3、2.0.0、2.1.1 の挙動が同じとなっています。

添付いたしましたパッチの適用で、与えられた文字列の汚染状態を伝播するようになります。

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

よろしくお願いします。

---Files--------------------------------
stringio_infect.patch (485 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-dev:48361] [ruby-trunk - Bug #9769] un-infection in StringIO#write
       [not found] <redmine.issue-9769.20140422115158@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2014-04-22 14:14 ` [ruby-dev:48120] [ruby-trunk - Bug #9769] [Closed] " nobu
@ 2014-07-02  7:13 ` usa
  2014-08-08 14:59 ` [ruby-dev:48465] " nagachika00
  2014-09-03  3:53 ` [ruby-dev:48516] " usa
  5 siblings, 0 replies; 6+ messages in thread
From: usa @ 2014-07-02  7:13 UTC (permalink / raw
  To: ruby-dev

Issue #9769 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED

----------------------------------------
Bug #9769: un-infection in StringIO#write
https://bugs.ruby-lang.org/issues/9769#change-47543

* Author: 宗介 相良
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [amd64-freebsd10]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
StringIO#write において、汚染された文字列を与えても汚染状態が伝播しません。

* 文字列の拡張を伴わない書き込み (こちらは伝播する)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

* 文字列の拡張を伴う書き込み (こちらが伝播しない)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>false, :sio=>false}

内部文字列オブジェクトに伝播されたほうが好ましいと思います。

確認した限りでは 1.9.3、2.0.0、2.1.1 の挙動が同じとなっています。

添付いたしましたパッチの適用で、与えられた文字列の汚染状態を伝播するようになります。

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

よろしくお願いします。

---Files--------------------------------
stringio_infect.patch (485 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-dev:48465] [ruby-trunk - Bug #9769] un-infection in StringIO#write
       [not found] <redmine.issue-9769.20140422115158@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2014-07-02  7:13 ` [ruby-dev:48361] [ruby-trunk - Bug #9769] " usa
@ 2014-08-08 14:59 ` nagachika00
  2014-09-03  3:53 ` [ruby-dev:48516] " usa
  5 siblings, 0 replies; 6+ messages in thread
From: nagachika00 @ 2014-08-08 14:59 UTC (permalink / raw
  To: ruby-dev

Issue #9769 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

r45676 and r45677 were backported into `ruby_2_1` branch. 

----------------------------------------
Bug #9769: un-infection in StringIO#write
https://bugs.ruby-lang.org/issues/9769#change-48256

* Author: 宗介 相良
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [amd64-freebsd10]
* Backport: 2.0.0: REQUIRED, 2.1: DONE
----------------------------------------
StringIO#write において、汚染された文字列を与えても汚染状態が伝播しません。

* 文字列の拡張を伴わない書き込み (こちらは伝播する)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

* 文字列の拡張を伴う書き込み (こちらが伝播しない)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>false, :sio=>false}

内部文字列オブジェクトに伝播されたほうが好ましいと思います。

確認した限りでは 1.9.3、2.0.0、2.1.1 の挙動が同じとなっています。

添付いたしましたパッチの適用で、与えられた文字列の汚染状態を伝播するようになります。

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

よろしくお願いします。

---Files--------------------------------
stringio_infect.patch (485 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-dev:48516] [ruby-trunk - Bug #9769] un-infection in StringIO#write
       [not found] <redmine.issue-9769.20140422115158@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2014-08-08 14:59 ` [ruby-dev:48465] " nagachika00
@ 2014-09-03  3:53 ` usa
  5 siblings, 0 replies; 6+ messages in thread
From: usa @ 2014-09-03  3:53 UTC (permalink / raw
  To: ruby-dev

Issue #9769 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

backported into `ruby_2_0_0` at r47366.

----------------------------------------
Bug #9769: un-infection in StringIO#write
https://bugs.ruby-lang.org/issues/9769#change-48615

* Author: 宗介 相良
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [amd64-freebsd10]
* Backport: 2.0.0: DONE, 2.1: DONE
----------------------------------------
StringIO#write において、汚染された文字列を与えても汚染状態が伝播しません。

* 文字列の拡張を伴わない書き込み (こちらは伝播する)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

* 文字列の拡張を伴う書き込み (こちらが伝播しない)

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>false, :sio=>false}

内部文字列オブジェクトに伝播されたほうが好ましいと思います。

確認した限りでは 1.9.3、2.0.0、2.1.1 の挙動が同じとなっています。

添付いたしましたパッチの適用で、与えられた文字列の汚染状態を伝播するようになります。

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

$ ruby -r stringio -e 'str = "abcdefg"; sio = StringIO.new(str, "ab"); sio << "hijklmn".taint; p str: str.tainted?, sio: sio.tainted?'
{:str=>true, :sio=>false}

よろしくお願いします。

---Files--------------------------------
stringio_infect.patch (485 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-03  4:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-9769.20140422115158@ruby-lang.org>
2014-04-22 11:51 ` [ruby-dev:48118] [ruby-trunk - Bug #9769] [Open] un-infection in StringIO#write snowjail
2014-04-22 13:47 ` [ruby-dev:48119] [ruby-trunk - Bug #9769] " shyouhei
2014-04-22 14:14 ` [ruby-dev:48120] [ruby-trunk - Bug #9769] [Closed] " nobu
2014-07-02  7:13 ` [ruby-dev:48361] [ruby-trunk - Bug #9769] " usa
2014-08-08 14:59 ` [ruby-dev:48465] " nagachika00
2014-09-03  3:53 ` [ruby-dev:48516] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).