From nobody Wed Oct 28 20:41:35 2026 X-Original-To: dev-commits-src-branches@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 4jFK5r2MNwz6x6bB for ; Wed, 28 Oct 2026 20:41:36 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFK5q6nvbz4b3s for ; Wed, 28 Oct 2026 20:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793220096; 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=vRyPRbisjSjtdBSsNkPhuptMDikKlwOj7Ql99RFBx5g=; b=DEz/Hb/6rQwgCORFSSW1wqkYeH+fiaDBmiEPg3oNWRlUhQ9lGEj1Ug3cKpcwUp3JgtUQgU 0MhKJH1zlMwlSbZgkh7do3PP9C3wRKMww6JYh8xPYnFZLkdrPweWaHW1sRt7XNyMKzQi9N h9EpGT1rx0aZqoDh3lwHSTDFTrnrxONBK0aGOubs6QyXY7zdVPAyRmjeMUqKsY/RqNZcd7 cSX3xesrCLfkyXokMdrbb0kRh/7qgDab6FxMrg3+vs4g9jaWylMV/Sbndcyho0yug/vbZg aAbJNlLMuu5J2Jf44hD/UzPzFjQebvt8V1ew+vTUXwqnoOsh3roBkW8F3sG+cQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793220096; b=UZXPQam0hxmCluT5LpofyXiynh5yPKYBgLvQ1x/bJlyW21JyIAf6/J9JnGy3/K5uUGIh4y lFhd4IjPN+B1QdAQSM0QGyOA4itpcQ0qKXRuBvQtTvv6jRoCBMA/yZoec7nNg/Ex1aaJ9V ZWuVzsf8f+h/tbCmIHQLsJVX32x9FGl/MLk9L9Uhs2FNIk81GgrLWwpcW5TzfptMKw0BC+ RgV6lg3/ULmSdmmBzgcQu46wFYXUqWnyPMkoTG5kQxxmPuQGCgs1YivV4rqUCbVRN8bd1D RucqURSobmRduYyMeT6VhdnwVhfirCaeg4+roVQce9OeVNdHkDXL3zqHZ2Vxow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793220096; 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=vRyPRbisjSjtdBSsNkPhuptMDikKlwOj7Ql99RFBx5g=; b=E+z7hmXczAE3Uq73EqvRw9F01P9Acpn+Qh0PGL398NNeW4xFaXNMgbq9XBdpUP68JT5lpC r7hDR39IFuFQ5pDF8uE4j7tGmhORlAV7aWaFmGTsHo4pEpT+Ejni/95SGryeADHD6oZTw6 gpacUcfN07LcBUogdPMcjjVZQS+vFv5ffZlR3awo5H7KN7zAvYOBBYbonpMq0HQly1yCl0 7Zgy0gPyFHpiN8+bSrWDRJqR+3VDyQWSgcMbaPRomt859oNSIcm0Mw1dzoguMh+db+lqSo QOTK9nNgcEUiHzXZER72NRXHLVYGLAcUJpidUizMcj9eaeeJB8ZyUJLEDD7VNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jFK5q5pFZz1MFm for ; Wed, 28 Oct 2026 20:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d0eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 28 Oct 2026 20:41:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: R. Christian McDonald Subject: git: d75d97d95c86 - stable/14 - pf: Set the reassembly flags under the rules lock List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d75d97d95c8676a30247b9020e3063f56f180902 Auto-Submitted: auto-generated Date: Wed, 28 Oct 2026 20:41:35 +0000 Message-Id: <6ae25dff.1d0eb.3ac8be0@gitrepo.freebsd.org> The branch stable/14 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=d75d97d95c8676a30247b9020e3063f56f180902 commit d75d97d95c8676a30247b9020e3063f56f180902 Author: R. Christian McDonald AuthorDate: 2026-10-13 13:39:30 +0000 Commit: R. Christian McDonald CommitDate: 2026-10-28 20:38:08 +0000 pf: Set the reassembly flags under the rules lock DIOCSETREASS stored V_pf_status.reass twice with no lock, first the flags it was given and then, if reassembly was not among them, zero. pf_normalize_ip() and pf_normalize_ip6() read the flags with the rules lock held for reading, so a packet could see the intermediate value. Compute the flags first and store them once, with the rules lock held for writing, as DIOCSETDEBUG and DIOCSETHOSTID do. Reviewed by: kp Fixes: 39282ef356db ("pf: backport OpenBSD syntax of "scrub" option for "match" and "pass" rules") MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D60531 (cherry picked from commit b951994eddd4d274514df751da06680a32139037) --- sys/netpfil/pf/pf_ioctl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 39d3536fe38e..619e8e18c900 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5697,12 +5697,16 @@ DIOCCHANGEADDR_error: case DIOCSETREASS: { u_int32_t *reass = (u_int32_t *)addr; + u_int32_t flags; - V_pf_status.reass = *reass & (PF_REASS_ENABLED|PF_REASS_NODF); + flags = *reass & (PF_REASS_ENABLED|PF_REASS_NODF); /* Removal of DF flag without reassembly enabled is not a * valid combination. Disable reassembly in such case. */ - if (!(V_pf_status.reass & PF_REASS_ENABLED)) - V_pf_status.reass = 0; + if (!(flags & PF_REASS_ENABLED)) + flags = 0; + PF_RULES_WLOCK(); + V_pf_status.reass = flags; + PF_RULES_WUNLOCK(); break; }