From nobody Mon Dec 30 20:44:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YMSlW5wm0z5j0Z4; Mon, 30 Dec 2024 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YMSlW36y0z4Hkt; Mon, 30 Dec 2024 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735591495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ElTtG1WBM3okvXeycUOv6prh1+3gqjO2mkOMZjNFYxY=; b=atkSnf44KetntgFSJ8F/4GRMlDi2fUKdblys1ptZ953jRn6Y31wEG5GTSXERtNcDgEifs5 2jBxGOav7+/xqYhm5CJVTxwYM3vEVtFBlwYDyuxFD3553sFQknD6K9KgkPDSyDPeV140VQ Uy62nsrA9U9OslZJL8oBWww52zK+D8GzbFyE+R/C1V5KYEtiQaJRd4QIMI/mxG1IoRFATn WjgNQvNOcLt/SEmVahx5fKv4igsMbBf8U/lZtK2rNL+jViKyedx8E2H4Kagz29y7DSAjwB YzNK0Tajg8klAB4dQWUNExDN1wmHqHX47GU2owbWjmUpulRracdkh8CpESyXMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735591495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ElTtG1WBM3okvXeycUOv6prh1+3gqjO2mkOMZjNFYxY=; b=xZNxzGVMOVqSHUGpOUYcOrx++RusapIQog+HkzdCg/UsdHU12z3O3entvYMDzO0xAzpWGo An4Sh5ynB7/gzydO5LJWDfnMr1tlnqxKg1YhaqcC7gyBn7AOoyFNLWMPW8+7gcwrETC2V5 vBAyoFEV6Zrq91E7hD9dI/e7PiMt1hJQXXaeWwnG/muBksgaGD2RYpCXRoqaNbPHdKFUR3 T0YhfOm/2A3die3myiCMXfB6GAM1G5yN6JW2HcXhhzKFvY7i3c2jRdsf4JNkyGUt4NWC2V 5UkKKcaPXJrmEew+KWfw7PshmMwlkPiSCCITflFemT19B9rLUWL00lTr7H3MSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735591495; a=rsa-sha256; cv=none; b=rTIMJj6Rocb6CbP2xvFGyrQjjO32AN/zXOyZ3mXrSn4qUpOxihFhEOwfVqR2B6TTgfFw7t fEpwcA59a15mAg51+P3OIkh8E3mTIlzSnQ63sAE0/gkqR9YWzYNpI4OHXPdmv4KzdpGhhV mqNZrXzWnWEMKfdiuGQGmiE2P2iyg4VfZwX9+SFcOdf5b6HxDbeLKoUB533k5PGNgPrJY9 zvQH2i2hj2hVdgu1RgVzDDunEfKTIz2QRw5/B5HSNDMHUupVribqUARQ3wZLtrWQJWzO8o 5HEV+p29ygG/JjUa/a3SvyNhmbbKZ0tDPIsYMiJfZCtWrxS8ETEwOj8Jv+LQCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YMSlW2j7Xz18dc; Mon, 30 Dec 2024 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BUKitOO020189; Mon, 30 Dec 2024 20:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BUKitcm020186; Mon, 30 Dec 2024 20:44:55 GMT (envelope-from git) Date: Mon, 30 Dec 2024 20:44:55 GMT Message-Id: <202412302044.4BUKitcm020186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4be8e29e776b - main - pf: initialise addresses in pf_get_transaddr_af() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4be8e29e776b078b43e95c04259ecebdf407481f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4be8e29e776b078b43e95c04259ecebdf407481f commit 4be8e29e776b078b43e95c04259ecebdf407481f Author: Kristof Provost AuthorDate: 2024-12-28 17:52:18 +0000 Commit: Kristof Provost 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",