From nobody Wed May 27 13:41:44 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 4gQW4T1JDPz6f3fC for ; Wed, 27 May 2026 13:41:45 +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 4gQW4S5cz4z4Jcw for ; Wed, 27 May 2026 13:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779889304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RDhuDMO9jXRa+b6ZuE+gWa1AZmMIfdLZNYvC/4xncq0=; b=mclqrWtLkkNeWcHJKX98Q3XrpdshOqwWfsy8YFZY57SyCrKVvs25TG6pSvIrG/u6ZpJo4w Ll3HDL71oWfH5ggw6RoHg5mXSCPLdd0mCFusTEMtmb6f7817dRhtk2LygWBV8xnBUAz0gP /KgXpBVwHC3JFATdwqFf+MJ+COcWGIX3yXBCCJ+GRWQSHYnI6rX+APVBtDhrwKXfn6miGk f2B3p5jUpeVDVzVv0OU4ESW1HsU8HJmQlyxZIluYgyPab+1+G6FhdImZfgpp+HH3LuqMAH H9gHJl+c3Y13t3PxY5gs1Ao4i1P1ecsd3Ovkjt8hg/s7UMpMz45hvrl4lW+b9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779889304; a=rsa-sha256; cv=none; b=pRJKMmqWwzMhnXd3cfJerGfDWoZv/cQhZgrGvLgPQmuKmNFbeKmXDMzDsJia+ejeyon+GQ bvgCEJ23muwcFkPP/CriI5uoreKp6uDcAHHFgNlINAw5UZtmGkn3dt5Z6IdSgZ2K+9TBNV VRAYYpch0Bx9G7751S2daGGIdhFfOl7L3ge0owZw4zynBAfr8T4R5KPhJqs5016zdUBGS9 4tPpez8FPn9oeOsoXsJcVk/xv3FmFdDQuhjvUVqCeeMKCTLpiC5dC9JUw6E23n558mikMt ZRtTmrlVgSVy4+dHgsHZpJzw0kc41YS/wai/jVDhwyx7vjTx5miwSXlD81JyDQ== 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=1779889304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RDhuDMO9jXRa+b6ZuE+gWa1AZmMIfdLZNYvC/4xncq0=; b=X6x3Lc6S1IozpMHbw3FzzB4m9jhaz5e/PaIKoS2TLmFcZKuRLo59mjdcbPk2euihxmm+uM ZWDhEylw38pWnHfJW3LznVdCbPRUNLCygngFDbh/csqH+ZWgRU3evZ3EP+KxNttgCRXtxC TZNjO0tKSfk2nesqbRjpSt58COHIzPdqn1jg7mIQi0tammpqSJFnApDi3rmhI3QEsgMad9 eLCUOy8aRdPvq7hAfRzZgOP84e3ouqt2XGgklv0KqU2OfVZt68xDshYqG8P4NtYJgpuuWZ i6xxBnWGIPpBv60h4CN2yfQkz1RM9EZvpkMaBOMdU+ZQrS0RLR6RiyW70cWy4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gQW4S54Hfz11d1 for ; Wed, 27 May 2026 13:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d680 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 27 May 2026 13:41:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: fefcd4994069 - stable/15 - ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fefcd4994069de7fe0d4f94f2f9f9d3e5ae47ba2 Auto-Submitted: auto-generated Date: Wed, 27 May 2026 13:41:44 +0000 Message-Id: <6a16f498.1d680.749626c5@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fefcd4994069de7fe0d4f94f2f9f9d3e5ae47ba2 commit fefcd4994069de7fe0d4f94f2f9f9d3e5ae47ba2 Author: Teddy Engel AuthorDate: 2026-05-19 21:36:23 +0000 Commit: Cy Schubert CommitDate: 2026-05-27 13:41:25 +0000 ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() Add NULL check for fin->fin_m before calling M_LEN() in the ICMPv6 error handling code path. When ipf_checkicmp6matchingstate() calls ipf_makefrip() with a synthesized fr_info_t that has fin_m set to NULL, the subsequent call to ipf_pr_ipv6hdr() can reach ipf_pr_icmp6() which would crash when trying to access the mbuf via M_LEN(). PR: 288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel (cherry picked from commit cdc40489a7a617b742e295cf9005b3569b45e823) --- sys/netpfil/ipfilter/netinet/fil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index cc723eba4ffc..2eb921621f6b 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -916,6 +916,9 @@ ipf_pr_icmp6(fr_info_t *fin) if (fin->fin_plen < ICMP6ERR_IPICMPHLEN) break; + if (fin->fin_m == NULL) + break; + if (M_LEN(fin->fin_m) < fin->fin_plen) { if (ipf_coalesce(fin) != 1) return;