Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D7C448B372 for ; Wed, 1 Jul 2026 13:35:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782912924; cv=none; b=M9EayIL2SOiC6/N5yooAIfKphvjhDvjnSutlIKv7T463DBc9GBWvk/KlaK3TCEE7tlGcn+bq4tj/oy39BRmRg8LKSDfZ/c9tQ6vUzvMS0HxRwiYAVMyml2wRFMi7TmWJ2KAsWlmSTyTAyRqNJBpy+2habEW3hHyar6CemJ/5j+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782912924; c=relaxed/simple; bh=t2dWRgN3mHQ3LiwDp9+WiCWe8lQlltgoqi//flCqJ20=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ovoOIc85lRFT4/P25fneqyimL11gmVyT0JS9Yde/ce1Yi6mY7VI5ZMAgOrY1qJNkH87mjnEMZQiCxPjVKH9g6DJgtmiJjQqe80w/7pIAtsz1z9bZATHRQTRP+jlzjmZDuBicprtzkf2Dk/h54LZ+Aow9139h6GV7UmAxjxE9gPM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0pfHDrYX; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0pfHDrYX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 349471F000E9; Wed, 1 Jul 2026 13:35:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782912919; bh=euMmle0IfPkPpofqQDuOxr5d8iHkikogN04L2/4GRxc=; h=From:To:Cc:Subject:Date:Reply-To; b=0pfHDrYXQ0roAbBAabbd111tO6aYMyX99d8lj6WeRIZzJbMarDYJTJBozGWfcHHbi Vxh12htUrx9GrvIeYF+9tzPbQutsRAA/BwioEoBULxEGuj08mktIK1qMH7K4UxGPZH biBtpYUw92VL2VNjlqooe7OvCEqO+4lI30d/C0qQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53349: netfilter: nf_conntrack: destroy stale expectfn expectations on unregister Date: Wed, 1 Jul 2026 15:35:04 +0200 Message-ID: <2026070146-CVE-2026-53349-a347@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4718; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=N+uUEYyibfbzh3IKaVxfgORe+fbfKVNlIXEvOLsSito=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmu4mWt2tK6Da8Evb+8X8n6aZ5E2e0kNd+ZHn1TZT8Lr o56JhbYEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOR38swz3TWLCXFN14rdVt/ rL2ouJNTlflTPsOCuWpT73FZ/+uRyTkhdPn83Qy/tP7NAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack: destroy stale expectfn expectations on unregister NAT helpers such as nf_nat_h323 store a raw pointer to module text in exp->expectfn (e.g. ip_nat_q931_expect). nf_ct_helper_expectfn_unregister() only unlinks the callback descriptor and never walks the expectation table, so an expectation pending at module removal survives with a dangling exp->expectfn into freed module text. When the expected connection arrives, init_conntrack() invokes exp->expectfn(), now a stale pointer into the unloaded module. Reproduced on a KASAN build by loading the H.323 helpers, creating a Q.931 expectation, unloading nf_nat_h323, then connecting to the expected port: Oops: int3: 0000 [#1] SMP KASAN NOPTI RIP: 0010:0xffffffffa06102d1 init_conntrack.isra.0 (net/netfilter/nf_conntrack_core.c:1862) nf_conntrack_in (net/netfilter/nf_conntrack_core.c:2049) ipv4_conntrack_local (net/netfilter/nf_conntrack_proto.c:223) nf_hook_slow (net/netfilter/core.c:619) __ip_local_out (net/ipv4/ip_output.c:120) __tcp_transmit_skb (net/ipv4/tcp_output.c:1715) tcp_connect (net/ipv4/tcp_output.c:4374) tcp_v4_connect (net/ipv4/tcp_ipv4.c:345) __sys_connect (net/socket.c:2167) Modules linked in: nf_conntrack_h323 [last unloaded: nf_nat_h323] Reaching the dangling state requires CAP_SYS_MODULE in the initial user namespace to remove a NAT helper that still has live expectations, so this is a robustness fix; leaving an expectation pointing at freed text is wrong regardless. Add nf_ct_helper_expectfn_destroy(), which walks the expectation table and drops every expectation whose ->expectfn matches the descriptor being torn down. Call it from each NAT helper's exit path after the existing RCU grace period, so no expectation outlives the code it points at and no extra synchronize_rcu() is introduced. With the fix, the same reproducer runs to completion without the Oops. The Linux kernel CVE team has assigned CVE-2026-53349 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.20 with commit f587de0e2feb9eb9b94f98d0a7b7437e4d6617b4 and fixed in 6.1.176 with commit fbfde85308b99938a6092c48753214d190ece48d Issue introduced in 2.6.20 with commit f587de0e2feb9eb9b94f98d0a7b7437e4d6617b4 and fixed in 6.6.143 with commit 29d8cc44bbdf7b83a1929912214afe6643c1b4f1 Issue introduced in 2.6.20 with commit f587de0e2feb9eb9b94f98d0a7b7437e4d6617b4 and fixed in 6.12.94 with commit f92c90a2a3e6ff6f9f7fe88fde9004b4ca8f956d Issue introduced in 2.6.20 with commit f587de0e2feb9eb9b94f98d0a7b7437e4d6617b4 and fixed in 6.18.36 with commit 9d017671dcfcec23321fb7962dea624f9e71ddb1 Issue introduced in 2.6.20 with commit f587de0e2feb9eb9b94f98d0a7b7437e4d6617b4 and fixed in 7.0.13 with commit bf8c0b5dd203be94c2ad50e264cec19267c6bd39 Issue introduced in 2.6.20 with commit f587de0e2feb9eb9b94f98d0a7b7437e4d6617b4 and fixed in 7.1 with commit c3009418f9fa1dcb3eb86f4d8c92583537b5faa3 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-53349 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: include/net/netfilter/nf_conntrack_helper.h net/ipv4/netfilter/nf_nat_h323.c net/netfilter/nf_conntrack_helper.c net/netfilter/nf_nat_core.c net/netfilter/nf_nat_sip.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/fbfde85308b99938a6092c48753214d190ece48d https://git.kernel.org/stable/c/29d8cc44bbdf7b83a1929912214afe6643c1b4f1 https://git.kernel.org/stable/c/f92c90a2a3e6ff6f9f7fe88fde9004b4ca8f956d https://git.kernel.org/stable/c/9d017671dcfcec23321fb7962dea624f9e71ddb1 https://git.kernel.org/stable/c/bf8c0b5dd203be94c2ad50e264cec19267c6bd39 https://git.kernel.org/stable/c/c3009418f9fa1dcb3eb86f4d8c92583537b5faa3