From e09f92422ebff3454332ebbb28d578d8103e7203 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 16 Nov 2023 13:29:18 +0100 Subject: [PATCH] ctdbd_conn: don't use uninitialized memory in ctdbd_register_ips() We dump the structure into the socket, so we need to zero the content including possible padding. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15523 Signed-off-by: Stefan Metzmacher Reviewed-by: Martin Schwenke (cherry picked from commit 240139370aa19f53dd3de0ff468afd994d3bd973) --- source3/lib/ctdbd_conn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index dd9206b00fd..4382bae54fc 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1144,6 +1144,7 @@ int ctdbd_register_ips(struct ctdbd_connection *conn, smbd_ctdb_canonicalize_ip(_client, &client); smbd_ctdb_canonicalize_ip(_server, &server); + ZERO_STRUCT(p); switch (client.ss_family) { case AF_INET: memcpy(&p.dst.ip, &server, sizeof(p.dst.ip)); -- 2.11.4.GIT