]> git.ipfire.org Git - thirdparty/openssl.git/commit
Avoid an infinite loop in BN_GF2m_mod_inv
authorMatt Caswell <matt@openssl.org>
Wed, 6 Dec 2023 11:09:53 +0000 (11:09 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 12 Dec 2023 16:12:14 +0000 (16:12 +0000)
commitea3c14f1ec504dae450a3a439491922adebaaac9
treefefb5b10e636430b9019620d0ab2a40dd723b0cc
parent31c695c3876b00a26d5caef5e0735329c36ff7b1
Avoid an infinite loop in BN_GF2m_mod_inv

If p is set to 1 when calling BN_GF2m_mod_inv then an infinite loop will
result. Calling this function set 1 when applications call this directly
is a non-sensical value - so this would be considered a bug in the caller.

It does not seem possible to cause OpenSSL internal callers of
BN_GF2m_mod_inv to call it with a value of 1.

So, for the above reasons, this is not considered a security issue.
Reported by Bing Shi.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/22960)

(cherry picked from commit 9c1b8f17ce2471ca37ee3936d07aed29aab10975)
crypto/bn/bn_gf2m.c