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

0 views
Skip to first unread message

bbbrumley

unread,
11:31 AM (11 hours ago) 11:31 AM
to openssl...@openssl.org
Branch: refs/heads/openssl-4.1
Home: https://github.openssl.org/openssl/openssl
Commit: 8d5fb2252fc0121e5317f23d0ae7afa7f170ff4b
https://github.openssl.org/openssl/openssl/commit/8d5fb2252fc0121e5317f23d0ae7afa7f170ff4b
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: 73aed8d5e3439a41a6129edb6083741096229627
https://github.openssl.org/openssl/openssl/commit/73aed8d5e3439a41a6129edb6083741096229627
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/a7e57082ccb2...73aed8d5e343

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