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

0 views
Skip to first unread message

bbbrumley

unread,
11:28 AM (11 hours ago) 11:28 AM
to openssl...@openssl.org
Branch: refs/heads/master
Home: https://github.openssl.org/openssl/openssl
Commit: dce11301ff54174df95b9d593bd873e8e50f0938
https://github.openssl.org/openssl/openssl/commit/dce11301ff54174df95b9d593bd873e8e50f0938
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


Commit: 675492dd45027b15f56875d737a84926cafbb05c
https://github.openssl.org/openssl/openssl/commit/675492dd45027b15f56875d737a84926cafbb05c
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


Compare: https://github.openssl.org/openssl/openssl/compare/7272e2ebb09b...675492dd4502

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