[openssl/openssl] db925a: Make DH_check_pub_key() and DH_generate_key() safe...
Richard Levitte
noreply at github.com
Mon Nov 6 07:56:14 UTC 2023
Branch: refs/heads/openssl-3.0
Home: https://github.com/openssl/openssl
Commit: db925ae2e65d0d925adef429afc37f75bd1c2017
https://github.com/openssl/openssl/commit/db925ae2e65d0d925adef429afc37f75bd1c2017
Author: Richard Levitte <levitte at openssl.org>
Date: 2023-11-06 (Mon, 06 Nov 2023)
Changed paths:
M crypto/dh/dh_check.c
M crypto/dh/dh_err.c
M crypto/dh/dh_key.c
M crypto/err/openssl.txt
M include/crypto/dherr.h
M include/openssl/dh.h
M include/openssl/dherr.h
Log Message:
-----------
Make DH_check_pub_key() and DH_generate_key() safer yet
We already check for an excessively large P in DH_generate_key(), but not in
DH_check_pub_key(), and none of them check for an excessively large Q.
This change adds all the missing excessive size checks of P and Q.
It's to be noted that behaviours surrounding excessively sized P and Q
differ. DH_check() raises an error on the excessively sized P, but only
sets a flag for the excessively sized Q. This behaviour is mimicked in
DH_check_pub_key().
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22518)
(cherry picked from commit ddeb4b6c6d527e54ce9a99cba785c0f7776e54b6)
Commit: 81a7f2a25d5833cee4130544a9301ffc29f30cbc
https://github.com/openssl/openssl/commit/81a7f2a25d5833cee4130544a9301ffc29f30cbc
Author: Richard Levitte <levitte at openssl.org>
Date: 2023-11-06 (Mon, 06 Nov 2023)
Changed paths:
M include/internal/ffc.h
Log Message:
-----------
Fix conflicts between DH check flags and FFC check flags
There are comments in include/openssl/dh.h and include/internal/ffc.h
that they must be aligned with each other, and yet, clashes have been
introduced.
The simplest fix is to move the offending FFC flags out of the way, as they
are indeed internal and shouldn't affect any public interface, apart from
those that are aligned with the DH flags, which are public.
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22518)
(cherry picked from commit 3629ce9c4cb638d9458d8febd21659920903a749)
Compare: https://github.com/openssl/openssl/compare/b37871cd0a42...81a7f2a25d58
More information about the openssl-commits
mailing list