<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Matasano Chargen - Latest Comments in Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://matasanochargen.disqus.com/</link><description></description><language>en</language><lastBuildDate>Wed, 27 May 2009 07:47:02 -0000</lastBuildDate><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-10049345</link><description>appears to be fixed with the latest patch versions (1.8, 1.9)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">roger</dc:creator><pubDate>Wed, 27 May 2009 07:47:02 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324024</link><description>Use RE:Trace to hunt it down to the last bit!&lt;br&gt;&lt;br&gt;&lt;a href="http://www.poppopret.org/code.html" rel="nofollow"&gt;http://www.poppopret.org/code.html&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">filip</dc:creator><pubDate>Fri, 27 Jun 2008 13:27:11 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324023</link><description>Has any successfully gotten both of these test to *not* segmentation fault?&lt;br&gt;&lt;br&gt;Here is a pastie of my efforts: &lt;a href="http://pastie.org/222714" rel="nofollow"&gt;http://pastie.org/222714&lt;/a&gt;.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">DeLynn Berry</dc:creator><pubDate>Thu, 26 Jun 2008 13:11:24 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324022</link><description>Hi, your fixed-width code sections in the blog are too thin for the font size I use. Could you consider adding the magic CSS that will add scrollbars for overflowing fixed-width elements?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jon</dc:creator><pubDate>Wed, 25 Jun 2008 05:50:17 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324021</link><description>awesome. ;D&lt;br&gt;&lt;br&gt;just wait until i go public with my javascript stuff !</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jf</dc:creator><pubDate>Wed, 25 Jun 2008 00:07:55 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324031</link><description>Well, these issues are not new and have been known about since 2005. &lt;br&gt;&lt;br&gt;&lt;a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/7818" rel="nofollow"&gt;http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ru...&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://www.blackhat.com/presentations/bh-jp-05/bh-jp-05-brezinski.pdf" rel="nofollow"&gt;http://www.blackhat.com/presentations/bh-jp-05/...&lt;/a&gt;&lt;br&gt;&lt;br&gt;Fixing the macros (which should be replaced with functions AFAIAC) was not the right approach, which Matz knew, but he did not (nor any other member of core) choose to fix the issues in the 1.8 code. Now it is 2008 and Yao had to rediscover the problems to make something happen. Way to go ruby-core!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominique Brezinski</dc:creator><pubDate>Tue, 24 Jun 2008 16:57:01 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324020</link><description>-Igal&lt;br&gt;&lt;br&gt;I guest you should have to wait until Ruby developers create a valid patch. The whole code that manages arrays need a bit of review, while playing with those bugs, I've found another problem, which I reported to security@ruby-lang. So I think the best thing you can do to help Ruby community, is not providing patches but trying to spot other mistakes in the code and report them. IMHO</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Snagg</dc:creator><pubDate>Tue, 24 Jun 2008 06:39:43 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324019</link><description>@Thomas Ptacek: That ruby-talk thread I mentioned above is for people that care about Ruby who are actively trying to create a patch to fix these problems. There are at least two very promising patches now available there that need to be reviewed and tested. Maybe you and others can help? Thanks.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igal Koshevoy</dc:creator><pubDate>Tue, 24 Jun 2008 03:00:25 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324035</link><description>yawn.&lt;br&gt;&lt;br&gt;I recognize that I should be committing descriptions including the phrase "context-dependent" to &lt;a href="http://cve.mitre.org" rel="nofollow"&gt;cve.mitre.org&lt;/a&gt; instead of expressing the maximum attitude I'm allowed as an allegedly neutral party, but... Ruby is popular.  Thus someone's gonna research it, and they're gonna find bugs.  It's the circle of strife.&lt;br&gt;&lt;br&gt;Of course, whatever replaces Ruby as the newest fad won't have any vulnerabilities at all, so we can all rest easy after this whole thing blows over.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steve Christey</dc:creator><pubDate>Tue, 24 Jun 2008 01:28:09 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324034</link><description>Aure-&lt;br&gt;&lt;br&gt;One more f in there and it will crash.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ssss</dc:creator><pubDate>Mon, 23 Jun 2008 11:35:19 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324033</link><description>Aure --- what version of Ruby? They aren't Mac-only flaws.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Ptacek</dc:creator><pubDate>Mon, 23 Jun 2008 11:29:44 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324032</link><description>Igal --- really just not at all interested in discussing Zed Shaw's blog post on &lt;a href="http://ruby-forum.com" rel="nofollow"&gt;ruby-forum.com&lt;/a&gt;. I'm sorry you're having your time wasted like that.&lt;br&gt;&lt;br&gt;If you see anything interesting here, you are welcome to cross-post it.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Ptacek</dc:creator><pubDate>Mon, 23 Jun 2008 11:28:22 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324028</link><description>It's great to see some code here that can help assert the errors and their solutions.&lt;br&gt;&lt;br&gt;Can folks on this blog thread please join us in a discussion of this issue at the ruby-talk mailing list or its web-accessible thread at &lt;a href="http://www.ruby-forum.com/topic/157034" rel="nofollow"&gt;http://www.ruby-forum.com/topic/157034&lt;/a&gt; ? I'm trying to get everyone that's been working on this talking in one place so we can best coordinate our efforts to resolve this. &lt;br&gt;&lt;br&gt;Thank you.&lt;br&gt;&lt;br&gt;-igal</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Igal Koshevoy</dc:creator><pubDate>Mon, 23 Jun 2008 10:51:10 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324018</link><description>I've tried both ways to hang ruby and it didn't work on my PC. First one works as I expected:&lt;br&gt;irb(main):001:0&amp;gt; ary = []&lt;br&gt;=&amp;gt; []&lt;br&gt;irb(main):002:0&amp;gt; ary[0x7ffffff] = "A"&lt;br&gt;=&amp;gt; "A"&lt;br&gt;irb(main):003:0&amp;gt; ary[0x7ffffff] = "A"&lt;br&gt;=&amp;gt; "A"&lt;br&gt;irb(main):004:0&amp;gt; ary[0x7ffffff]&lt;br&gt;=&amp;gt; "A"&lt;br&gt;&lt;br&gt;The second one, started to trash (I expected it because of the size of the string) and I aborted it.&lt;br&gt;irb(main):006:0&amp;gt; while 1;str&amp;lt;&amp;lt;str;puts str.size;end&lt;br&gt;131072&lt;br&gt;262144&lt;br&gt;524288&lt;br&gt;1048576&lt;br&gt;2097152&lt;br&gt;4194304&lt;br&gt;8388608&lt;br&gt;16777216&lt;br&gt;33554432&lt;br&gt;67108864&lt;br&gt;134217728&lt;br&gt;268435456&lt;br&gt;536870912&lt;br&gt;IRB::Abort: abort then interrupt!!&lt;br&gt;        from /usr/lib/ruby/1.8/irb.rb:81:in `irb_abort'&lt;br&gt;        from /usr/lib/ruby/1.8/irb.rb:243:in `signal_handle'&lt;br&gt;        from /usr/lib/ruby/1.8/irb.rb:66:in `start'&lt;br&gt;        from /usr/lib/ruby/1.8/irb.rb:66:in `call'&lt;br&gt;        from /usr/lib/ruby/1.8/irb.rb:66:in `start'&lt;br&gt;        from (irb):6:in `call'&lt;br&gt;        from (irb):6&lt;br&gt;        from :0&lt;br&gt;&lt;br&gt;And I'm using an vulnerable version.&lt;br&gt;$ ruby --version&lt;br&gt;ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]&lt;br&gt;&lt;br&gt;On ubuntu hardy.&lt;br&gt;&lt;br&gt;Is this Mac only?&lt;br&gt;If it is, the impact is much lower (production servers tend to be Linux for Ruby web applications).&lt;br&gt;&lt;br&gt;Aureliano.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aure</dc:creator><pubDate>Mon, 23 Jun 2008 09:37:56 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324017</link><description>Updated to latest subversion ruby_1_8_6 branch, revision 17546. (patchlevel 231)&lt;br&gt;&lt;br&gt;Still getting a seg fault on:&lt;br&gt;&lt;br&gt;ruby -ve 'str = "A"*(2**16) ; loop{ str &amp;lt;&amp;lt; str ; puts str.size }'&lt;br&gt;ruby 1.8.6 (2008-06-22 patchlevel 231) [i686-linux]&lt;br&gt;131072&lt;br&gt;262144&lt;br&gt;-e:1: [BUG] Segmentation fault</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">spatulasnout</dc:creator><pubDate>Mon, 23 Jun 2008 01:46:44 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324027</link><description>Using&lt;br&gt;&lt;br&gt;defaults write com.apple.CrashReporter DialogType developer&lt;br&gt;&lt;br&gt;I get for ary[0x7fffffff] = "A":&lt;br&gt;&lt;br&gt;EXC_BAD_ACCESS (0x0001)&lt;br&gt;KERN_PROTECTION_FAILURE (0x0002) at 0x00705000&lt;br&gt;&lt;br&gt;Thread 0 Crashed:&lt;br&gt;0    rb_mem_clear + 16 (array.c:30)&lt;br&gt;1    rb_ary_store + 212 (array.c:377)&lt;br&gt;2    rb_ary_aset + 412 (array.c:1078)&lt;br&gt;3    rb_call0 + 1196 (eval.c:5815)&lt;br&gt;4    rb_call + 612 (eval.c:6063)&lt;br&gt;5    rb_eval + 6804 (eval.c:3430)&lt;br&gt;6    eval + 1068 (eval.c:6458)&lt;br&gt;7    rb_f_eval + 468 (eval.c:6576)&lt;br&gt;8    rb_call0 + 1196 (eval.c:5815)&lt;br&gt;9    rb_call + 612 (eval.c:6063)&lt;br&gt;&lt;br&gt;Just my two cents.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">brian</dc:creator><pubDate>Sun, 22 Jun 2008 06:12:20 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324025</link><description>Uhm done some test last night. Seems like in rb_ary_store (), before writing to the array the memory is zeroed, resulting in a crash. Still there might be other entry points next candidate: rb_ary_times().</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Snagg</dc:creator><pubDate>Sun, 22 Jun 2008 05:00:56 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324026</link><description>The test case for Bignum (note to Zed: this was fixed in a commit labelled "check for integer overflow") is easy:&lt;br&gt;&lt;br&gt;i = 1 &amp;lt;&amp;lt; 0x1fffffff; j = i; true&lt;br&gt;j = j &amp;lt;&amp;lt; 0x1fffffff; true&lt;br&gt;j = j &amp;lt;&amp;lt; 0x1fffffff; true&lt;br&gt;j = j &amp;lt;&amp;lt; 0x1fffffff; true&lt;br&gt;j = j &amp;lt;&amp;lt; 0x1fffffff; true&lt;br&gt;j = j &amp;lt;&amp;lt; 0x1fffffff; true&lt;br&gt;j = j &amp;lt;&amp;lt; 0x1fffffff; true&lt;br&gt;j = j &amp;lt;&amp;lt; 0x1fffffff; true&lt;br&gt;j&lt;br&gt;&lt;br&gt;Break in rb_big2str, and land here:&lt;br&gt;&lt;br&gt;677	    while (i &amp;&amp; j) {&lt;br&gt;(gdb) print i&lt;br&gt;$16 = 134217728&lt;br&gt;(gdb) print j&lt;br&gt;$17 = 2&lt;br&gt;&lt;br&gt;("i" is the size of the bignum, "j" is the size of the target string).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Ptacek</dc:creator><pubDate>Sun, 22 Jun 2008 03:46:11 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324016</link><description>Very sorry, fixed it.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nobu Nakada</dc:creator><pubDate>Sat, 21 Jun 2008 21:21:30 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324029</link><description>Re: the crash on 1.8.7-p22, I have forwarded it on to the Ruby security team.  &lt;br&gt;&lt;br&gt;The test case does not cause a crash in the patched version of 1.8.6 that will be going out in a Mac OS X update soon.  The patch that Ruby ended up with was not the same as the one that I sent them.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Drew Yao</dc:creator><pubDate>Sat, 21 Jun 2008 15:36:06 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324015</link><description>@tj&lt;br&gt;&lt;br&gt;Was it just the string operation that still caused the segfault on 1.8.7-p22? &lt;br&gt;&lt;br&gt;I'd say IndexError is the correct(er) error to throw for the second issue - array[0x7fffffff] assignment? It's a different result to the segfault it caused on my ruby 1.8.6 (2007-09-24 patchlevel 111).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rhys</dc:creator><pubDate>Sat, 21 Jun 2008 11:11:19 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324030</link><description>I guess I expected this after watching jf's talk "Horizon 3: smashing the stack for profit (advances in attacking interpreted languages)" at this years PH-Neutral.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mac</dc:creator><pubDate>Sat, 21 Jun 2008 09:44:01 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324013</link><description>For the record... I love Ruby. I blame Drew!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Monti</dc:creator><pubDate>Fri, 20 Jun 2008 22:45:31 -0000</pubDate></item><item><title>Re: Updates on Drew Yao&amp;#8217;s Terrible Ruby Vulnerabilities</title><link>http://www.matasano.com/log/1070/updates-on-drew-yaos-terrible-ruby-vulnerabilities/#comment-2324014</link><description>Pathed to 1.8.7-p22 and the string bug outlined above still causes the segfault:&lt;br&gt;irb(main):005:0&amp;gt; str = "A"*(2**16) ;while 1; str &amp;lt; ary = []; ary[0x7fffffff] = "A"&lt;br&gt;IndexError: index 2147483647 too big</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tj</dc:creator><pubDate>Fri, 20 Jun 2008 21:57:51 -0000</pubDate></item></channel></rss>