From nobody Tue May 5 16:25:55 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 4g93m439C0z6cNlx for ; Tue, 05 May 2026 16:25:56 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g93m40Vd7z3rcL for ; Tue, 05 May 2026 16:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777998356; 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=Rt8P5D6oL/+HFTpyQ04CEdKMeG0/1Zc+PIF+ZzxgyyE=; b=pN+CkJnhUIOdUdc7WMt7EOurF3w6kVuHbaVeQOH5wxnaiPqDKas2lVEZHwMU1A/lf3PG4h wc2YodirJoXVlcsWNesdabphC2XekbD1Y9EOgOcqTEGT9ZPLH+UqwmG2QxoS5YK3BmDttc HxIk5zSK3P/7jNKgTjfhNkhXMzCvkcRTK2LQqCm0ksoLE+SlzLV4TB/L1pzEjq5XoO4RjR 6PQL5KQkFoZnBZ4O6dJbAyHv4M+zJs/heOdkLYqY4z+7HH0pqHmfJJJ7pJxhjNQ5KosnDn qzrk4YLh+5qBikkcBrx3ASEWCBa9vYczgHBPkLbxnRszgcBHDEJeQ3npCYygvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777998356; a=rsa-sha256; cv=none; b=rc7Q3B8rnG672SRMc5AeQTLW8tpY2SKW0EgZWE6GaV2ZKfacabFAiHIFWFugumtsoCJmyw l9OwSKwE8qwSaclsFEBximPP2vaiiG5wFHdPHh2hjIQRW9JNHDllC/0fKYzkwx9klJKqnQ PJjJLgr+LpnxzAu9651Vjwx2ZsNSuXhVSu6l5zuf/wwUesrTmbGNLSJCZVkUlrDUPl3LFx BkfAXI0zPnzTwgHKg+2nJvrK4xYb/jCgjFIA3h/xgLK8OD/d4QZPg7AbSDDuro6Y91GBMq uk0hXTPRNOdh7gBN0CjBuN664p4XJbP6rX92VXkAPd5Hg3wQm0J5XxrS2t1iDA== 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=1777998356; 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=Rt8P5D6oL/+HFTpyQ04CEdKMeG0/1Zc+PIF+ZzxgyyE=; b=ixdWgNjHbY3k8UaQbNV5eEfkBTj1e+/m0z/h0QWN5fCHXqXca2peBvtKa+GPjpvVtpY2II 0rIEZkKF87CYl8M992OieNhKXKCmwIrfYKx8i+VODYCctSh5ADgLKejmjDvEDuxebIBQcn 4/evqfaVoIRvqo8iAjr2DaKpDJwcrkImMNxLB7qjo82aMFXJX6WU3+NQ/OoBNQrUxT8coj RbDRL34stftQkQX7lPEzjTSw8Ukw3GwdGBAQvUAfcOQ8+AmFCbwxhzB3/fQiFv0Z1prkmh l85qNi6Pxa6OE3sDSTZ588JuH0vx+YisX8U/VCqRIygyQf8dWp1dwiwAaqyV7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g93m36wBxz1DxZ for ; Tue, 05 May 2026 16:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25792 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 05 May 2026 16:25:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 730fb48f1387 - stable/15 - pf: improve ASCONF chunk validation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 730fb48f1387812ab82ea3b0ef807e6824425318 Auto-Submitted: auto-generated Date: Tue, 05 May 2026 16:25:55 +0000 Message-Id: <69fa1a13.25792.1bd373d@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=730fb48f1387812ab82ea3b0ef807e6824425318 commit 730fb48f1387812ab82ea3b0ef807e6824425318 Author: Kristof Provost AuthorDate: 2026-04-28 08:54:24 +0000 Commit: Kristof Provost CommitDate: 2026-05-05 07:33:23 +0000 pf: improve ASCONF chunk validation When processing an ASCONF chunk we failed to verify that the chunk length was at least 8 bytes. As a result we might end up passing a negative length to pf_multihome_scan(). Fortunately this merely meant the function did nothing, but we should discard such invalid packets, so explicitly check for this. MFC after: 1 week Reported by: Mark Johnston Sponsored by: Orange Business Services (cherry picked from commit bea1c2fcd7839fd90a8ce96d6dc6a033779bc3c2) --- sys/netpfil/pf/pf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7aee28e7b917..05a71cd45a35 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7794,6 +7794,9 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op, bool asconf) NULL, NULL, pd->af)) return (PF_DROP); + if (ntohs(ah.ph.param_length) < sizeof(ah)) + return (PF_DROP); + ret = pf_multihome_scan(start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, SCTP_ADD_IP_ADDRESS, true); @@ -7811,6 +7814,10 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op, bool asconf) if (!pf_pull_hdr(pd->m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); + + if (ntohs(ah.ph.param_length) < sizeof(ah)) + return (PF_DROP); + ret = pf_multihome_scan(start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, SCTP_DEL_IP_ADDRESS, true);