[openssl/openssl] cd3557: SSHKDF: refuse a digest that has no output to avoi...

0 views
Skip to first unread message

bbbrumley

unread,
11:40 AM (11 hours ago) 11:40 AM
to openssl...@openssl.org
Branch: refs/heads/openssl-3.5
Home: https://github.openssl.org/openssl/openssl
Commit: cd3557ca0eb8977101ca42a7b5bdfb8d3bea841e
https://github.openssl.org/openssl/openssl/commit/cd3557ca0eb8977101ca42a7b5bdfb8d3bea841e
Author: Billy Brumley <b...@iki.fi>
Date: 2026-11-24 (Tue, 24 Nov 2026)

Changed paths:
M providers/implementations/kdfs/sshkdf.c

Log Message:
-----------
SSHKDF: refuse a digest that has no output to avoid infinite loop

The key derivation specified by SSH appends one digest per round until
it has enough key material. With a zero-size digest, such as the NULL
digest, it leads to an infinite loop.

Check the digest size of the supplied digest algorithm and error out
if it is non-positive.

Fixes: 8d76481b189b "Implement SSH KDF"
Assisted-by: Claude:claude-mythos-5-2
Reviewed-by: Neil Horman <nho...@openssl.org>
Reviewed-by: Tomas Mraz <to...@openssl.foundation>
Reviewed-by: Paul Dale <paul...@oracle.com>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
Merge-date: Tue Nov 24 16:26:39 2026
Merged-from: https://github.com/openssl/openssl/pull/33923
(cherry picked from commit dce11301ff54174df95b9d593bd873e8e50f0938)


Commit: 75651aae2eeedd11bf42ecaff871a00db656b85d
https://github.openssl.org/openssl/openssl/commit/75651aae2eeedd11bf42ecaff871a00db656b85d
Author: Billy Brumley <b...@iki.fi>
Date: 2026-11-24 (Tue, 24 Nov 2026)

Changed paths:
M test/recipes/30-test_evp_data/evpkdf_ssh.txt

Log Message:
-----------
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 <nho...@openssl.org>
Reviewed-by: Tomas Mraz <to...@openssl.foundation>
Reviewed-by: Paul Dale <paul...@oracle.com>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
Merge-date: Tue Nov 24 16:26:41 2026
Merged-from: https://github.com/openssl/openssl/pull/33923
(cherry picked from commit 675492dd45027b15f56875d737a84926cafbb05c)


Compare: https://github.openssl.org/openssl/openssl/compare/1ad851363d5b...75651aae2eee

To unsubscribe from these emails, change your notification settings at https://github.openssl.org/openssl/openssl/settings/notifications
Reply all
Reply to author
Forward
0 new messages