Commit 675492dd45 for openssl.org
commit 675492dd45027b15f56875d737a84926cafbb05c
Author: Billy Brumley <bbb@iki.fi>
Date: Tue Nov 17 08:32:03 2026 -0500
test/recipes/30-test_evp_data/evpkdf_ssh.txt: add a test for SSHKDF NULL digest
Add a reproducer that triggered triggered the infinite loop during SSH
key derivation as a test vector.
Assisted-by: Claude:claude-mythos-5-2
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Merge-date: Tue Nov 24 16:26:41 2026
Merged-from: https://github.com/openssl/openssl/pull/33923
diff --git a/test/recipes/30-test_evp_data/evpkdf_ssh.txt b/test/recipes/30-test_evp_data/evpkdf_ssh.txt
index 6688c217aa..b0eecc3b39 100644
--- a/test/recipes/30-test_evp_data/evpkdf_ssh.txt
+++ b/test/recipes/30-test_evp_data/evpkdf_ssh.txt
@@ -4888,6 +4888,17 @@ Ctrl.hexsession_id = hexsession_id:a4ebd45934f56792b5112dcd75a1075fdc889245
Ctrl.type = type:A
Result = KDF_MISMATCH
+# A digest with no output cannot produce any key material
+Availablein = default
+KDF = SSHKDF
+Ctrl.digest = digest:NULL
+Ctrl.hexkey = hexkey:0102030405060708
+Ctrl.hexxcghash = hexxcghash:0102030405060708
+Ctrl.hexsession_id = hexsession_id:0102030405060708
+Ctrl.type = type:A
+Output = 00
+Result = KDF_DERIVE_ERROR
+
Title = FIPS indicator tests
# Test that the operation with unapproved digest function is rejected