git: 4be8e29e776b - main - pf: initialise addresses in pf_get_transaddr_af()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Dec 2024 20:44:55 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=4be8e29e776b078b43e95c04259ecebdf407481f
commit 4be8e29e776b078b43e95c04259ecebdf407481f
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-12-28 17:52:18 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-12-30 20:42:13 +0000
pf: initialise addresses in pf_get_transaddr_af()
Ensure we fully initialise nsaddr and ndaddr.
Reported by: markj, KMSAN
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
sys/netpfil/pf/pf_lb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c
index 35896bdcf5b1..cb92c724a541 100644
--- a/sys/netpfil/pf/pf_lb.c
+++ b/sys/netpfil/pf/pf_lb.c
@@ -994,6 +994,9 @@ pf_get_transaddr_af(struct pf_krule *r, struct pf_pdesc *pd)
struct pf_srchash *sh = NULL;
struct pf_ksrc_node *sns = NULL;
+ bzero(&nsaddr, sizeof(nsaddr));
+ bzero(&ndaddr, sizeof(ndaddr));
+
if (V_pf_status.debug >= PF_DEBUG_MISC) {
printf("pf: af-to %s %s, ",
pd->naf == AF_INET ? "inet" : "inet6",