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 A3E6D23A9BD for ; Wed, 4 Mar 2026 12:58:52 +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=1772629132; cv=none; b=uOOO2psmxbv3BIo4NGApRlkTbwwTqchSRkO9K480H+wZ9O2ZU3Cbsg6D1o7QFWWvsODmWTF7nU9tFJpxTN8TBHrhR6zCJfc6WvaVDNuC+gZgR9S1DRyPu3EliEwGIVW5/oe4UttJhxbATJYvzSI1O09LO2N1NNhGd7tIhpC1mEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772629132; c=relaxed/simple; bh=xi93rkEJzMpgDSNErMHJ9dJJDjeD7qnmhIn2vXRApmk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PEhVpiIFdAZjjgzrY2f6Mh22OCMPecVys9G05NFISGbaZpSWCKSUOqQ0YlCIgGZ9vMz1unxtvU9pFgYSQSfXMLOt354fxGB9XmRKh30yNo3BBtVuNYD/VH47V5ON4QqWSqjBoFZC/2RagNGM7EscfKzuWPAWsuHoqtqZ/27f3iM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RhmGubNC; 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="RhmGubNC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4800C19423; Wed, 4 Mar 2026 12:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1772629132; bh=xi93rkEJzMpgDSNErMHJ9dJJDjeD7qnmhIn2vXRApmk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=RhmGubNC+TPtXaAZpmE/cbFFinvfIR67fJb3EFD4LM7uvJTczrl/Zs1hH0eBhcl/A Laujy7aspkaRPE3/wQjwwoOmZDDMP0ko6JMH2DCYy2d3hUaeJQoJgEzwi0QHY2tEgO aGPgxPryxuoxbDZAtDoyGH0Kzw6rIWxYOKBCVoE8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23231: netfilter: nf_tables: fix use-after-free in nf_tables_addchain() Date: Wed, 4 Mar 2026 13:58:37 +0100 Message-ID: <2026030436-CVE-2026-23231-1a96@gregkh> X-Mailer: git-send-email 2.53.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=3021; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=W+en8mi3QlcRTfXyJRc98VBCpVjtx7OY0AVE7P4Aoik=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkrdGraK0NXPxXmf1ZfGssw+66ubYXcvHWP5nn/WntBK 5n1p1BgRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEwZVhwaFTOnVFp9mKpVwv hbEUKqhb/XwrxzBP1+7UG/vytA187v1qq9M++Jo9fGgKAA== 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: fix use-after-free in nf_tables_addchain() nf_tables_addchain() publishes the chain to table->chains via list_add_tail_rcu() (in nft_chain_add()) before registering hooks. If nf_tables_register_hook() then fails, the error path calls nft_chain_del() (list_del_rcu()) followed by nf_tables_chain_destroy() with no RCU grace period in between. This creates two use-after-free conditions: 1) Control-plane: nf_tables_dump_chains() traverses table->chains under rcu_read_lock(). A concurrent dump can still be walking the chain when the error path frees it. 2) Packet path: for NFPROTO_INET, nf_register_net_hook() briefly installs the IPv4 hook before IPv6 registration fails. Packets entering nft_do_chain() via the transient IPv4 hook can still be dereferencing chain->blob_gen_X when the error path frees the chain. Add synchronize_rcu() between nft_chain_del() and the chain destroy so that all RCU readers -- both dump threads and in-flight packet evaluation -- have finished before the chain is freed. The Linux kernel CVE team has assigned CVE-2026-23231 to this issue. Affected and fixed versions =========================== Issue introduced in 3.16 with commit 91c7b38dc9f0de4f7f444b796d14476bc12df7bc and fixed in 6.18.14 with commit dbd0af8083dd201f07c49110b2ee93710abdff28 Issue introduced in 3.16 with commit 91c7b38dc9f0de4f7f444b796d14476bc12df7bc and fixed in 6.19.4 with commit 2f9a4ffeb763aec822f8ff3d1e82202d27d46d4b Issue introduced in 3.16 with commit 91c7b38dc9f0de4f7f444b796d14476bc12df7bc and fixed in 7.0-rc1 with commit 71e99ee20fc3f662555118cf1159443250647533 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-23231 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: 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/dbd0af8083dd201f07c49110b2ee93710abdff28 https://git.kernel.org/stable/c/2f9a4ffeb763aec822f8ff3d1e82202d27d46d4b https://git.kernel.org/stable/c/71e99ee20fc3f662555118cf1159443250647533