[openssl-dev] Question about valgrind error in DH in 1.0.2

Andy Polyakov appro at openssl.org
Sun May 24 20:03:19 UTC 2015


>> Changing the movzwl to movzbl in bn_get_bits5 eliminates the valgrind
>> error.  But this isn't a valid fix since bn_get_bits5 no longer returns
>> the correct data.  My assembly skills are near nil.  Maybe someone else
>> can propose a valid fix. 
>>
>> Having said this, this does show the problem appears to be due to the
>> movzwl reading past the end of the buffer by a byte.
> 
> Correct.
> 
>> Given the data
>> allocated on the heap is likely surrounded by guard bytes, this is
>> likely a benign read outside the buffer.
> 
> Correct.
> 
>> But it should still be fixed.
> 
> Test attached.

Committed as
http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=69567687b0b7ed67831c17a010f4d46dfd059aef


More information about the openssl-dev mailing list