]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix NULL pointer dereference for BN_mod_exp2_mont
authorHugo Landau <hlandau@openssl.org>
Tue, 1 Mar 2022 14:08:12 +0000 (14:08 +0000)
committerTomas Mraz <tomas@openssl.org>
Thu, 3 Mar 2022 09:31:24 +0000 (10:31 +0100)
commit43135a5d2274c24e97f50e16ce492c22eb717ab2
tree83bc81c47f6ead004d720fbfd3a56b5997075998
parentdf5c86e9f80d14d699bad4c8889292fd9b4bd7ba
Fix NULL pointer dereference for BN_mod_exp2_mont

This fixes a bug whereby BN_mod_exp2_mont can dereference a NULL pointer
if BIGNUM argument m represents zero.

Regression test added. Fixes #17648.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17783)
crypto/bn/bn_exp2.c
test/bntest.c