Commit 9569582d5a for openssl.org
commit 9569582d5a3f4324e0488c6c92deb3f05353f33d
Author: Neil Horman <nhorman@openssl.org>
Date: Thu Jan 15 15:06:14 2026 -0500
initalize control block on dgram_sendmmsg
Passing uninitalized data to a syscall result in valgrind warnings, and
probably shouldn't be done anyway. Fix that
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Jan 29 16:37:32 2026
(Merged from https://github.com/openssl/openssl/pull/29573)
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 8a58237ce0..28333aecc7 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -1347,7 +1347,7 @@ static int dgram_sendmmsg(BIO *b, BIO_MSG *msg, size_t stride,
size_t i;
struct mmsghdr mh[BIO_MAX_MSGS_PER_CALL];
struct iovec iov[BIO_MAX_MSGS_PER_CALL];
- unsigned char control[BIO_MAX_MSGS_PER_CALL][BIO_CMSG_ALLOC_LEN];
+ unsigned char control[BIO_MAX_MSGS_PER_CALL][BIO_CMSG_ALLOC_LEN] = { { 0 } };
int have_local_enabled = data->local_addr_enabled;
#elif M_METHOD == M_METHOD_RECVMSG
int sysflags;
@@ -1355,7 +1355,7 @@ static int dgram_sendmmsg(BIO *b, BIO_MSG *msg, size_t stride,
ossl_ssize_t l;
struct msghdr mh;
struct iovec iov;
- unsigned char control[BIO_CMSG_ALLOC_LEN];
+ unsigned char control[BIO_CMSG_ALLOC_LEN] = { 0 };
int have_local_enabled = data->local_addr_enabled;
#elif M_METHOD == M_METHOD_WSARECVMSG
bio_dgram_data *data = (bio_dgram_data *)b->ptr;
@@ -1363,7 +1363,7 @@ static int dgram_sendmmsg(BIO *b, BIO_MSG *msg, size_t stride,
WSAMSG wmsg;
WSABUF wbuf;
DWORD num_bytes_sent = 0;
- unsigned char control[BIO_CMSG_ALLOC_LEN];
+ unsigned char control[BIO_CMSG_ALLOC_LEN] = { 0 };
#endif
#if M_METHOD == M_METHOD_RECVFROM || M_METHOD == M_METHOD_WSARECVMSG
int sysflags;