[openssl/openssl] 6495ca: Fix bn_gcd code to check return value when calling...

slontis noreply at reply.github.openssl.org
Tue Jul 5 06:18:33 UTC 2022


  Branch: refs/heads/OpenSSL_1_1_1-stable
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 6495cab1c876ad80ce983d848ccaa1dc286a63e1
      https://github.openssl.org/openssl/openssl/commit/6495cab1c876ad80ce983d848ccaa1dc286a63e1
  Author: slontis <shane.lontis at oracle.com>
  Date:   2022-07-05 (Tue, 05 Jul 2022)

  Changed paths:
    M crypto/bn/bn_gcd.c

  Log Message:
  -----------
  Fix bn_gcd code to check return value when calling BN_one()

BN_one() uses the expand function which calls malloc which may fail.
All other places that reference BN_one() check the return value.

The issue is triggered by a memory allocation failure.
Detected by PR #18355

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18697)

(cherry picked from commit 7fe7cc57af3db1e497877f0329ba17609b2efc8b)




More information about the openssl-commits mailing list