]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Use correctly formatted ALPN data in tserver
authorMatt Caswell <matt@openssl.org>
Fri, 31 May 2024 10:22:13 +0000 (11:22 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 27 Jun 2024 09:30:51 +0000 (10:30 +0100)
The QUIC test server was using incorrectly formatted ALPN data. With the
previous implementation of SSL_select_next_proto this went unnoticed. With
the new stricter implemenation it was failing.

Follow on from CVE-2024-5535

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24716)

ssl/quic/quic_tserver.c

index b9de60aea15fcb45d48cefa5d53287e3fca9e104..4f30eb14cec8de257671a4989a530a013909784a 100644 (file)
@@ -63,7 +63,7 @@ static int alpn_select_cb(SSL *ssl, const unsigned char **out,
 
     if (srv->args.alpn == NULL) {
         alpn = alpndeflt;
-        alpnlen = sizeof(alpn);
+        alpnlen = sizeof(alpndeflt);
     } else {
         alpn = srv->args.alpn;
         alpnlen = srv->args.alpnlen;