Re: incorrect large buffer handling in md5.c/sha1.c/sha256.c/sha512.c

2012-05-18 Thread Serge Belyshev
Paul Eggert writes: > On 05/18/2012 01:29 PM, Serge Belyshev wrote: > >> this part does exactly the same: increment ctx->total [1] by one, where >> larger increment may be needed. > > OK, I see. But this bug can only happen on unusual hosts, right? > I.e., hosts

Re: incorrect large buffer handling in md5.c/sha1.c/sha256.c/sha512.c

2012-05-18 Thread Serge Belyshev
> I don't see a bug in sha512.c, though; > could you please elaborate? Thanks. sha512.c:489: /* First increment the byte count. FIPS PUB 180-2 specifies the possible length of the file up to 2^128 bits. Here we only compute the number of bytes. Do a double word increment. */ c

incorrect large buffer handling in md5.c/sha1.c/sha256.c/sha512.c

2012-05-18 Thread Serge Belyshev
This is a cross-post from glibc bugreport: http://sourceware.org/bugzilla/show_bug.cgi?id=14090 In short, the code below handles blocks larger than 8 GB incorrectly because they require ctx->total[1] incremented more than by 1: ---