fix F-1238: Integer Overflow in ECDSA Verify Allocation of sig_len + hash_len

This commit is contained in:
Daniel Pouzzner
2026-06-12 17:13:25 -05:00
parent 0272f0a506
commit c84c44f62f
+5
View File
@@ -417,6 +417,11 @@ static int km_ecdsa_verify(struct akcipher_request *req)
goto ecdsa_verify_end;
}
if ((sig_len + hash_len) != ((word64)sig_len + (word64)hash_len)) {
err = -EINVAL;
goto ecdsa_verify_end;
}
sig = malloc(sig_len + hash_len);
if (unlikely(sig == NULL)) {
err = -ENOMEM;