From: Aram Sargsyan Date: Wed, 22 Jul 2026 15:48:42 +0000 (+0000) Subject: Initialize struct sockaddr_nl sa X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be1119a162b973a502df73cb1751108234502d34;p=thirdparty%2Fbind9.git Initialize struct sockaddr_nl sa The structure is initialized, which can cause problems e.g. with its nl_pid member. To quote from an LLM report in GL#6257: > A non-zero nl_pid is an explicit netlink port-ID request, so the > kernel either binds the socket to an arbitrary port ID (functionally > tolerable for a multicast-only listener, but it can squat another > process's natural port ID) or fails with EADDRINUSE when the garbage > value collides with an existing NETLINK_ROUTE socket in the same > namespace. Zero initialize the structure. --- diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index 6f544e0d7d1..02402e640c1 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -372,7 +372,7 @@ static isc_result_t route_socket(uv_os_sock_t *fdp) { uv_os_sock_t fd = -1; #ifdef USE_NETLINK - struct sockaddr_nl sa; + struct sockaddr_nl sa = { 0 }; int r; #endif