[#7653] parse.y: literal strings for tokens — Robin Stocker <robin@...>
Hi,
Hi,
Yukihiro Matsumoto wrote:
[#7674] Re: [PATCH] parse.y: literal strings for tokens — ville.mattila@...
ville.mattila@stonesoft.com wrote:
Hi again,
Hi,
[#7692] Socket Documentation commit ? — zdennis <zdennis@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#7708] Bug in libsnmp-ruby1.8 — Hadmut Danisch <hadmut@...>
Hi,
On Apr 11, 2006, at 6:23 AM, Hadmut Danisch wrote:
On 2006-04-12 02:04:32 +0900, Eric Hodel wrote:
On Apr 11, 2006, at 10:20 AM, Marcus Rueckert wrote:
[#7721] Ruby mentor in Googe's Summer of Code — "Evan Phoenix" <evan@...>
We missed out on it last year, so lets this year try to get ruby
[#7725] readpartial not working on ARM — Joel VanderWerf <vjoel@...>
[#7727] Stack trace doesn't include class — noreply@...
Bugs item #4151, was opened at 2006-04-17 23:10
On Apr 17, 2006, at 1:11 PM, noreply@rubyforge.org wrote:
On Wed, 19 Apr 2006, Eric Hodel wrote:
Hi --
[#7729] xmlrpc and charset=utf-8 — "Phil Tomson" <rubyfan@...>
I'm needed to interact with an XMLRPC server written using the
>>>>> On Sun, 18 Jun 2006 12:00:19 +0900
I first sent this from the wrong email account, so if that post somehow makes
On 6/19/06, Sean Russell <ser@germane-software.com> wrote:
[#7738] RDoc patches for GetoptLong — mathew <meta@...>
I added RDoc documentation to GetoptLong. The patches are attached. As
[#7744] Coverity Scan — "Pat Eyler" <rubypate@...>
I don't know if anyone else has signed up for access to the coverity
[#7765] possible defect in array.c — "Pat Eyler" <rubypate@...>
This one may be a false positive, I'm not sure. If it is, I'll happily mark
On 4/25/06, Pat Eyler <rubypate@gmail.com> wrote:
[#7770] Re: possible defect in array.c — "Brown, Warren" <warrenbrown@...>
> rb_range_beg_len (in range.c) does set beg and len.
On 4/26/06, Brown, Warren <warrenbrown@aquire.com> wrote:
On 4/26/06, Pat Eyler <rubypate@gmail.com> wrote:
On 4/26/06, Jacob Fugal <lukfugl@gmail.com> wrote:
On Thu, Apr 27, 2006 at 01:15:24AM +0900, Pat Eyler wrote:
Hi,
On Thu, Apr 27, 2006 at 09:41:00AM +0900, Nobuyoshi Nakada wrote:
[#7799] Patch: code-cleanup (k&r style) — Stefan Huehner <stefan@...>
Hi,
Hi,
Re: possible defect in array.c
I find it interesting that the Coverity scan does not detect integer
overflows. I reported one in this very code some time ago. Here is a
snippet of the code annoted to show the issue:
case 3:
[snipped]
len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
/* len is from method argument */
break;
}
rb_ary_modify(ary);
end = beg + len; /* end is derived from len */
if (end > RARRAY(ary)->len) { /* when a long len is specified,
this will be true */
if (end >= RARRAY(ary)->aux.capa) { /* this will be true also */
REALLOC_N(RARRAY(ary)->ptr, VALUE, end); /* size passed to
realloc() is sizeof(VALUE) * end--WRAP*/
RARRAY(ary)->aux.capa = end;
}
[snipped]
if (block_p) {
[snipped]
}
else {
p = RARRAY(ary)->ptr + beg;
pend = p + len; /* derived from len, which is now much longer
than memory allocated */
while (p < pend) {
*p++ = item; /* HEAP OVERFLOW! */
}
}
return ary;
}
This code triggers the integer wrap in array_fill (the safe level was
just set to show that the issue can be exploited regardless of safe
level restrictions):
#!/usr/bin/env ruby
$SAFE = 4
a = Array.new(100)
a.fill(".", 1, 0x40000001)
a.each_index {|i| a[i] = 'a' }
I think the Coverity scans are a good start, but this demonstrates
that just because their scanner does not find anything (in those
projects now labelled as bug-free by Coverity), it does not mean that
bugs don't exist (obvious point, I know). None the less, pointing out
bugs is always a good thing :) It is good to see people taking the
issues seriously.
Cheers,
Dom
On 4/25/06, Pat Eyler <rubypate@gmail.com> wrote:
> On 4/25/06, Jacob Fugal <lukfugl@gmail.com> wrote:
> > On 4/25/06, Pat Eyler <rubypate@gmail.com> wrote:
> > > This one may be a false positive, I'm not sure. If it is, I'll happily mark
> > > it that way at the coverity site.
> >
> > This one looks like a false positive to me. Up to the switch on line
> > 2114, [beg] is never touched. In each of the three delineated cases
> > for the switch, [beg] is set. (In case 2, if [rb_range_beg_len
> > succeeds], I *assume* [beg] is set by the function; if it fails, we
> > fall through to case 3 which does set [beg].) The only way [beg] could
> > be unset at line 2133 is if [argc] were less than 1 or greater than 3.
> > That, I hope, is gauranteed by the input to the function (along with
> > the hack on line 2109 for blocks).
>
> rb_range_beg_len (in range.c) does set beg and len. I'm hoping the
> other edge cases (argc <1 or >3) are covered too. If anyone else
> wants to speak with a little more authority, I'm all ears.
>
> >
> > Jacob Fugal
> >
> >
>
>