[openssl/openssl] 165797: ssl/ssl_lib.c: Add the check before cast from int ...

JiashengJiang noreply at github.com
Tue Apr 2 14:45:57 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 165797c7d829aa699f5cfdea4969cad0916e8cdf
      https://github.com/openssl/openssl/commit/165797c7d829aa699f5cfdea4969cad0916e8cdf
  Author: Jiasheng Jiang <jiasheng at purdue.edu>
  Date:   2024-04-02 (Tue, 02 Apr 2024)

  Changed paths:
    M ssl/ssl_lib.c

  Log Message:
  -----------
  ssl/ssl_lib.c: Add the check before cast from int to unsigned

Add the check before cast from int to unsigned to avoid integer overflow since EVP_MD_get_size() may return negative numbers.

Fixes: 919ba00942 ("DANE support structures, constructructors and accessors")
Signed-off-by: Jiasheng Jiang <jiasheng at purdue.edu>

Reviewed-by: Neil Horman <nhorman at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
(Merged from https://github.com/openssl/openssl/pull/23940)


  Commit: e53a7ccd11c6aef965c50335187a473540819390
      https://github.com/openssl/openssl/commit/e53a7ccd11c6aef965c50335187a473540819390
  Author: Jiasheng Jiang <jiasheng at purdue.edu>
  Date:   2024-04-02 (Tue, 02 Apr 2024)

  Changed paths:
    M ssl/ssl_lib.c

  Log Message:
  -----------
  Alter the check

Alter the check since 0 md size is an error.

Signed-off-by: Jiasheng Jiang <jiasheng at purdue.edu>

Reviewed-by: Neil Horman <nhorman at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
(Merged from https://github.com/openssl/openssl/pull/23940)


Compare: https://github.com/openssl/openssl/compare/de85587911dc...e53a7ccd11c6

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications


More information about the openssl-commits mailing list