[openssl-dev] Question about valgrind error in DH in 1.0.2
Henrik Grindal Bakken
hgb at ifi.uio.no
Tue May 19 08:34:30 UTC 2015
Andy Polyakov <appro at openssl.org> writes:
>> 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.
This patches fixed the valgrind errors for me.
--
Henrik Grindal Bakken <hgb at ifi.uio.no>
PGP ID: 8D436E52
Fingerprint: 131D 9590 F0CF 47EF 7963 02AF 9236 D25A 8D43 6E52
More information about the openssl-dev
mailing list