Andy, I'd still pull Adam's changes, at least for consistency reasons. Other assembly files seems to be using signed comparison for the same kinds of operations.
What do you think about it? Cheers, Fedor. On Wed, Jul 2, 2014 at 9:54 PM, Andy Polyakov via RT <[email protected]> wrote: > > Discovered this problem while trying to fix > > https://github.com/joyent/node/issues/7704. > > > > Attached is a fix for it. > > Trouble is that modified code might avoid crash, but it doesn't produce > correct result either. [No, not even Adam's suggestion]. Actually > bn_mul_mont is abused in bn_exp.c, because it's actually allowed to do > nothing depending on arguments, which is noted by zero return value. The > criteria for doing nothing is platform-specific, for example some > platforms insist that number of elements in even and data pointers are > aligned in specific manner. But there is one common criteria and it is > requirement that number of elements is larger than one. Correct solution > would be to introduce for example bn_mul_mont_eligible call that could > be queried prior taking the path calling bn_mul_mont. For the moment > there is only one platform that have this path, x86_64, and as interim > measure it's possible to implement the boundary condition check as > > http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=eca441b2b4d33d2a18d163ef9b4b3aff14251c73 > . > > > ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
