hybrid_mlkem: Fix incomplete error handling of short ML-KEM keys

Reported by Haruki Oyama.

Independently reported by Vulnerability Disclosure <vulns@meta.com>

Signed-off-by: Pavol Žáčik <pzacik@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Pavol Žáčik
2026-03-06 10:41:17 +01:00
committed by Jakub Jelen
parent e6f4001bc4
commit 3ce8bf3289

View File

@@ -656,6 +656,8 @@ static SSH_PACKET_CALLBACK(ssh_packet_server_hybrid_mlkem_init)
SSH_FATAL,
"Could not read ML-KEM pubkey from "
"the client init buffer, buffer too short");
session->session_state = SSH_SESSION_STATE_ERROR;
goto cleanup;
}
#ifdef DEBUG_CRYPTO