Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8DF832DC339 for ; Fri, 23 Jan 2026 15:25:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769181946; cv=none; b=BruN7S9DLjtlriAfBC4GBZUSuGoML93FHRkl2KrHTlSO4+gW5/IQJVhLt+jTgLeli8oaGr5NQLRdszI2hXQeDqoNqzRHQ04njWq7EBklsENDzEJWa2Cu8E+b5SWZWnT8RZndM/hn2ovpZEobUN3b56h1tp6Lx14OBqUKt2+vNnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769181946; c=relaxed/simple; bh=3MA2Iy8KWSStE8JvwGKKIwVYw4M0femCUuw35J7jhtM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tIAIA0aVHSXmN3FTI0KvGs7m018s362Knj+N0veA/LnXMozutNw9fvMHj91AiqZ89OOSPZ5RpeVAtUyKk4sSgg0s0ehkoLzVM0A+Oegm+ngW7q7aHIotYtrccX6v9L1g6wMtlDTSzqhKjnMfWdB+ZdHt0Mmropsu7fAjFu4SH4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ygfmlMb8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ygfmlMb8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA0B4C4CEF1; Fri, 23 Jan 2026 15:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769181946; bh=3MA2Iy8KWSStE8JvwGKKIwVYw4M0femCUuw35J7jhtM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=ygfmlMb8uGCgi8t6PrkLBV2STCHLCxaQFl4sFkRWoxjpMLNvrP1nE9wlUsa7xW53n J0+qLMW+10/twAUvKhqoOVzcpjD1eGgLs2uAd3c8/fVAjcsjeJwL74fcAnLF53F3ST ucjjmpXpYmHFlcDNoothXDoXPOxCM9Ev/j67JJyA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-71160: netfilter: nf_tables: avoid chain re-validation if possible Date: Fri, 23 Jan 2026 16:24:47 +0100 Message-ID: <2026012346-CVE-2025-71160-8c5d@gregkh> X-Mailer: git-send-email 2.52.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=4050; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ybD9Im03JL+MywtU5A75HU0Qskl7RSijxCtQG37FzEQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnFk/YV817Rj2RkbjgSEicu0LH6WbjB70OSeWJSf7xZu apnyRp2xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwER4rzHM9zrT45Kn1etcIl0o aSHvbH8o3COMYb77HDtJqfkNBdt9a7wX8K64fDnvQA4A 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_tables: avoid chain re-validation if possible Hamza Mahfooz reports cpu soft lock-ups in nft_chain_validate(): watchdog: BUG: soft lockup - CPU#1 stuck for 27s! [iptables-nft-re:37547] [..] RIP: 0010:nft_chain_validate+0xcb/0x110 [nf_tables] [..] nft_immediate_validate+0x36/0x50 [nf_tables] nft_chain_validate+0xc9/0x110 [nf_tables] nft_immediate_validate+0x36/0x50 [nf_tables] nft_chain_validate+0xc9/0x110 [nf_tables] nft_immediate_validate+0x36/0x50 [nf_tables] nft_chain_validate+0xc9/0x110 [nf_tables] nft_immediate_validate+0x36/0x50 [nf_tables] nft_chain_validate+0xc9/0x110 [nf_tables] nft_immediate_validate+0x36/0x50 [nf_tables] nft_chain_validate+0xc9/0x110 [nf_tables] nft_immediate_validate+0x36/0x50 [nf_tables] nft_chain_validate+0xc9/0x110 [nf_tables] nft_table_validate+0x6b/0xb0 [nf_tables] nf_tables_validate+0x8b/0xa0 [nf_tables] nf_tables_commit+0x1df/0x1eb0 [nf_tables] [..] Currently nf_tables will traverse the entire table (chain graph), starting from the entry points (base chains), exploring all possible paths (chain jumps). But there are cases where we could avoid revalidation. Consider: 1 input -> j2 -> j3 2 input -> j2 -> j3 3 input -> j1 -> j2 -> j3 Then the second rule does not need to revalidate j2, and, by extension j3, because this was already checked during validation of the first rule. We need to validate it only for rule 3. This is needed because chain loop detection also ensures we do not exceed the jump stack: Just because we know that j2 is cycle free, its last jump might now exceed the allowed stack size. We also need to update all reachable chains with the new largest observed call depth. Care has to be taken to revalidate even if the chain depth won't be an issue: chain validation also ensures that expressions are not called from invalid base chains. For example, the masquerade expression can only be called from NAT postrouting base chains. Therefore we also need to keep record of the base chain context (type, hooknum) and revalidate if the chain becomes reachable from a different hook location. The Linux kernel CVE team has assigned CVE-2025-71160 to this issue. Affected and fixed versions =========================== Fixed in 6.6.121 with commit 53de1e6cde8f9b791d9cf61aa0e7b02cf5bbe8b1 Fixed in 6.12.66 with commit 14fa3d1927f1382f86e3f70a51f26005c8e3cff6 Fixed in 6.18.6 with commit 09d6074995c186e449979fe6c1b0f1a69cf9bd3b Fixed in 6.19-rc2 with commit 8e1a1bc4f5a42747c08130b8242ebebd1210b32f 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-2025-71160 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_tables.h net/netfilter/nf_tables_api.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/53de1e6cde8f9b791d9cf61aa0e7b02cf5bbe8b1 https://git.kernel.org/stable/c/14fa3d1927f1382f86e3f70a51f26005c8e3cff6 https://git.kernel.org/stable/c/09d6074995c186e449979fe6c1b0f1a69cf9bd3b https://git.kernel.org/stable/c/8e1a1bc4f5a42747c08130b8242ebebd1210b32f