From nobody Tue May 5 16:25:56 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 4g93m53Zc5z6cNcD 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 4g93m46xYKz3rtJ 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=1777998357; 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=xvjH4btZAdQIOmHL7+TNWKsJLWSc7N4WRw1KVTtAos3iGzBQpgeNpNfABt8vdpftrcYS5n DMujEw7pCn9Onv8hg8PNdFGLi8r/HEl3qAGmisYBqQDYn4aRQPWlPT+VFgIHKeg317yftf Jrfw4toeedjiMe78L07r+jvpcuGt52TE1GTaVFrv/dthV+xqGniEBiaoJUThzxJtmnvPeX 0NJ48rHIEc2xLp1MX2L/z65izh7VfOb+ETOGHSd2rRHpQOdo8ximsH1I7c+jtLHCjK4IeC jNiRlmRU2w5Mok5j9uAHZQhGEw1EB35duWAsi0/RYnhwHeUXhnL0vdZ3KtmHsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777998357; a=rsa-sha256; cv=none; b=Kks0e4V0I/Xcuu/P6wferq6nMcVgncYw+M7e8IoWfmzbA0afDdY2xtnzsGFDPDhFqxttYZ r9vUYriXkhRvS2atdfNffhUpxg8lhDVVhscbGF9WDo5jVFc5kDBt70vB7DtUy14WGCSzsg JPxIzildLCMRJTF8SMmzcyKnVtB3GGKycFCcWiEZ/8ABpPjDwi2K2ct1jAINx718vcaTdJ fIqtM9RIapB/J3kR/Q+ahoJ8JLw57GDrVnePfE2c/fF0wdWJH7sm9JOnfLygMsTQL40kxS NUWImUgs+UOB89iG+X62r/smmbBUhkxpcHzg8CoJike9g3eRsXdFlounTnrR9Q== 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=1777998357; 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=yDxQBkneyd8tP/Nx/5mPJIPF3twpGl+7MCjGAT7MuCzZLZZcxcczSE9OC2YQGlamX8gAks BjleC4TGX2079Bs8Gb4iFP1rM9rC7MKos83wNo/qPWnvMffkd51IGcwhMA9z4+1V173Eu4 ET0nYS2zXvDdHOY8UB+6Ek6Tglr/0GHJpZWH3DVVIWyQIZYAjyUUgiGt3PYER+QGmVIOCQ ASgVOLSNSQp3zP3PPUfJq+6DUSbY2PxNngUzxmcgDGsW0Kj+HTsZTuiAy6LybXGG0vl9sm 3fiTqFia06qk+HlZj1b72wSsO8f7LwyQvFfDQixmnOWJR4TYMUVCgKX7GZXy+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g93m46GgCz1DgW 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: 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/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);