From nobody Fri May 30 13:16:06 2025 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 4b83dy3D1Cz5xg4F; Fri, 30 May 2025 13:16:06 +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 4b83dy2dcsz3cfx; Fri, 30 May 2025 13:16:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748610966; 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=pTWJ/AhjfAEZ+Bn7+zMezEIYITNWL9nXrXSCcUBbVVI=; b=T4k2ms98GtaQD75MtUc7eZVJHfdUwmE+ERmBDX21pWDYvAw6OyCTthoLh7luOBZfq2Y0gT n1yMbbNE3/AEcFPRrNtnIcCFgRsPKFN7P+tRPbEN8SIBIWJg6D8U72eJgORD5MxYpr9MJx 4LUdVftIqsDi8hdR6u+ULCOYhHrUiIlTIPhaauDazOFEsfyKsYTBQXp1NK+9Qv6qKZ29C0 Gxf3ktz1ZBftTtLof1w1tkwY1Drzgl1Dl5/kH1JoLMMe1YRXKWnsG9HhVnmFl6jlB82qsy 0SYtAGq0n8pzB98fRFkiiYSyGBKw/F7S9wrxq6cuu505drFrsScXMO2VNOZf5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748610966; a=rsa-sha256; cv=none; b=fQTl+VwIBF24+xDdWrfR958gRO0eMZrYs7IuLhqmBAVFu0rjZxqfOcpGLaRFVHs4v1Diby I/L9AlgDkx41YG7bZk1rGGnb31h5KU3/zWYMXRua7b/kAZZFZ3+BhmYFRMeFsk0Kpzvi86 +DD0H8MVej4MxEle3M/2f/RAWTE7eZt8efxP5wfTQiCwMgw1w4D2PgLuPcWmDYt2wtsfaB hWilEQqNjk4Tq9bGadcnqqIdSrEF1oIGGZywquNCfJVzmBXZSzCnr8L/OVw4bR6RU+NsT2 4/AzJmoQIy8tmXoX2hkhOv6G7WC5bycSmjC5h28iKO+Hqlll0L78sxk3stgPfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748610966; 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=pTWJ/AhjfAEZ+Bn7+zMezEIYITNWL9nXrXSCcUBbVVI=; b=ZpGUNnr3/UwU/pmTJsb/xSMf4g7kmewrWzgq3xynExLdWvE3mXMOwfuSTSHGj/s4LFE+ft /U1HJuasdUWsZNSBN+tOzI3O7rLvIEaWPYTleYSmNV0Col/Y34wuyDtzWPmX0LadwDAkve AxSzx16CtUSwdrzv9S/geiNJAoSDe/3PWD+jIuS/PyZfKLWNrm32MGPTz5FuATYXRZDjds eyT00eiulG/HESxD2ZWVntOfn5etL5mmuidUioR/dENpt8xxcU4iNF46njOeAL1vOgAgyz 0Fwiy/21t4mzh/ywZYX5naell4RkpffNipznKWjYLwVE/32R3NnWL6ci6s0tAw== 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 4b83dy2B0jztrX; Fri, 30 May 2025 13:16:06 +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 54UDG6nV080479; Fri, 30 May 2025 13:16:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54UDG6kZ080476; Fri, 30 May 2025 13:16:06 GMT (envelope-from git) Date: Fri, 30 May 2025 13:16:06 GMT Message-Id: <202505301316.54UDG6kZ080476@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: 581e064ddeb4 - main - libpfctl: clear out source nodes before retrieving them 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: 581e064ddeb431d1ac304c48c176c88a14424fd9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=581e064ddeb431d1ac304c48c176c88a14424fd9 commit 581e064ddeb431d1ac304c48c176c88a14424fd9 Author: Kristof Provost AuthorDate: 2025-05-30 08:10:18 +0000 Commit: Kristof Provost CommitDate: 2025-05-30 13:15:54 +0000 libpfctl: clear out source nodes before retrieving them Zero out the struct pfctl_src_node before we read the next one. Avoid having stray stack information (or the previous source node) influence our result. Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index a4afa26f0afe..cbc193268505 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -3060,6 +3060,7 @@ pfctl_get_srcnodes(struct pfctl_handle *h, pfctl_get_srcnode_fn fn, void *arg) return (ENXIO); while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + bzero(&sn, sizeof(sn)); if (!snl_parse_nlmsg(&h->ss, hdr, &srcnode_parser, &sn)) continue;