Skip to content

Commit

Permalink
Check for excess data in CertificateVerify
Browse files Browse the repository at this point in the history
As reported by Alicja Kario, we ignored excess bytes after the
signature payload in TLS CertificateVerify Messages.  These
should not be present.

Fixes: openssl#25298

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#25302)

(cherry picked from commit b4e4bf2)
  • Loading branch information
Viktor Dukhovni authored and t8m committed Aug 29, 2024
1 parent c2a3ef4 commit 2afff32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ssl/statem/statem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)
SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
goto err;
}
if (PACKET_remaining(pkt) != 0) {
SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
goto err;
}

if (!get_cert_verify_tbs_data(s, tls13tbs, &hdata, &hdatalen)) {
/* SSLfatal() already called */
Expand Down

0 comments on commit 2afff32

Please sign in to comment.