From nobody Tue May 05 16:25:56 2026 X-Original-To: dev-commits-src-all@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 4g93m53ZbBz6cNT2 for ; Tue, 05 May 2026 16:25:57 +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 4g93m46fzWz3ry8 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=EIxxyC1D3ml5RGnmd38ay5AggHfPS0fiiZsBiwgZWfE=; b=l649+1fWLtdFuLIaO+cQaZMPGqBaoFlnPz0T0L50o1EQrYoAVsW0Vfad7LTxpUoaRSvHZV XlCzTZL2Pc0FSlvQzQwRW16AbGF1NWq59YI6CtusZ6dtpCiTFijeLOFAJvcN0AuW3VJE3Q 1beOBPfoTaslH+olGNGA1D+IxxHuWbiPznuQndfywz5dovPY/hWHvSZw3FsEddDP7o9S7K 7GLkRztKZhfHPTSFxsUrZzevQ3sAaPoY18oEll1YU06pYK3cPD/crM10a1vr1QGIk7X8Z6 KfoONT8Z8E7NeQp4Joxa/iU9EfmEozyLxxK5RtrhtznBJ3xX0jI0dzvZHTPHSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777998356; a=rsa-sha256; cv=none; b=GQ0M3QFCi74J6rIpa0sMJjchULhX+ywtnuIqjdgzTv9T3xiu9kiRHR+N/E4oXoBNj0IOsf rYE6w3l7GqFjR8/x7aIpaYGmEZrEGkj/8QQ+xqMwY8GjNgCu7DlWQeiWvP1/unVfpY+bHU cFfcbokOJEA5EY0lqnjrs/8oPd4AZ76kVJIwiJHw4jTA8RP1j9ZMXg/B74qvOGUfTRTubc nduc4r9Vd1Ojilr3UkPaDcybBixnP7bE44eqYdXmEOp3wrYrjlvuoDq53HVIAJlf2elbyE p7JDe5jXvW3WbBarZ1wmu+Mm/wsiNqbRC0oV/dP92AIJG71sra7KYK3Vsu/G6Q== 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=EIxxyC1D3ml5RGnmd38ay5AggHfPS0fiiZsBiwgZWfE=; b=h2gFWUbmjWpt1PZxlFNuFAx6eCxazI1F8iLOzb7v2DLfLWlnmTUawt+cOtz+sHzgtqewVi xhKpZATqwx7IpfynbKkGaYAvipfpGJ58lrh9abIgLW1dSz/NAJR4wClwBChT8HX9UgSzzm sVwL0Pf1ADz/VpftzjaXzGG/REyPN4E8fiH8vvLh2mJ8xPQa3QnF5sesIG50ow63nMCi0I KnFEBXGmOKMSjsnVbEV2Rv/+3Io72pCIYqSZSz7yK37jV9uvCa9E/55C5paAo1xFwpCPFZ fJCZBp/grzNbJeHvgN1QigI0i42gGRkDQV3GgeLtEQgMciGHqnrqGJaFme6u8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g93m46FPzz1DRk for ; Tue, 05 May 2026 16:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24794 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 05 May 2026 16:25:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9fe189c79a81 - stable/14 - pf: improve ASCONF chunk validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 9fe189c79a8161380800dcff1d15c4cea7467a7e Auto-Submitted: auto-generated Date: Tue, 05 May 2026 16:25:56 +0000 Message-Id: <69fa1a14.24794.5e2b0a94@gitrepo.freebsd.org> The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9fe189c79a8161380800dcff1d15c4cea7467a7e commit 9fe189c79a8161380800dcff1d15c4cea7467a7e Author: Kristof Provost AuthorDate: 2026-04-28 08:54:24 +0000 Commit: Kristof Provost CommitDate: 2026-05-05 07:34:26 +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 3eab758296a9..469087a040e1 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6707,6 +6707,9 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, NULL, NULL, pd->af)) return (PF_DROP); + if (ntohs(ah.ph.param_length) < sizeof(ah)) + return (PF_DROP); + ret = pf_multihome_scan(m, start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, SCTP_ADD_IP_ADDRESS, true); @@ -6724,6 +6727,10 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, if (!pf_pull_hdr(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(m, start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, SCTP_DEL_IP_ADDRESS, true);