[openssl/openssl] 7fe7cc: Fix bn_gcd code to check return value when calling...

slontis noreply at reply.github.openssl.org
Tue Jul 5 06:17:32 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 7fe7cc57af3db1e497877f0329ba17609b2efc8b
      https://github.openssl.org/openssl/openssl/commit/7fe7cc57af3db1e497877f0329ba17609b2efc8b
  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)




More information about the openssl-commits mailing list