]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: ssl: Properly initialize msg_controllen.
authorOlivier Houchard <ohouchard@haproxy.com>
Sat, 6 Sep 2025 12:18:18 +0000 (14:18 +0200)
committerOlivier Houchard <cognet@ci0.org>
Sat, 6 Sep 2025 12:19:48 +0000 (14:19 +0200)
When kTLS is compiled in, make sure msg_controllen is initialized to 0.
If we're not actually kTLS, then it won't be set, but we'll check that
it is non-zero later to check if we ancillary data.
This does not need to be backported.
This should fix CID 1620865, as reported in github issue #3106.

src/ssl_sock.c

index 5e7865e52d122da7e2effa1da7585d0c16fd5f8d..f16b4e7c0e32e9bb386d685c863481c2679a7a0d 100644 (file)
@@ -344,7 +344,7 @@ static int ha_ssl_read(BIO *h, char *buf, int size)
                struct cmsghdr hdr;
                char buf[CMSG_SPACE(sizeof(unsigned char))];
        } cmsgbuf;
-       size_t msg_controllen;
+       size_t msg_controllen = 0;
 #endif
 #endif
        struct buffer tmpbuf;