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 B99182701B8 for ; Sat, 4 Oct 2025 15:19:03 +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=1759591143; cv=none; b=dio20nmPzjjIXXj8e61XcTBE3g4ZUfkpMj/S6ylIALqxMemKhZfPJrRrex0s/V29O3VOzJC2UgG01q7HsVluUex2BbwplRSCvsbVL/Fy6K0CR85tfyoLGIvpkjoH2zwVXqMMb+OkmD4pwRSfa0CrPILABhjMFMAlxm7GCPV5OnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759591143; c=relaxed/simple; bh=MjJkpzpY35p32IyilCBEzGt2wKANFJUKTeGQpXptGA8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FkvTAK/lQq7owwoIJuYnMqxGXivjxHkHoLHVrwNr5ysQvCDRHSIJ7RhKA4Z+axuChKnSpk3T1CnNZ7L/kBZL1fU1Jd1v3GGTnlJUZ2cdIrfVYHXJ5fEDeU4GR3vazKXDLikx/dtg0289Obq4mGCefFJJnLW8vAzGCILDg4BTgrw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mYkH/jyq; 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="mYkH/jyq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40652C4CEF1; Sat, 4 Oct 2025 15:19:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759591143; bh=MjJkpzpY35p32IyilCBEzGt2wKANFJUKTeGQpXptGA8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mYkH/jyqYDelqAAkiIfhlZhzAUKxB4Bj9gH528nK2REWRrDdXRk9ASW9fYORnBEzg g6MtJ42bZaJtvcSKm287tBsDAQsdwmk19nyeAo1f2MzYwGQtoY/QB+gWoXVtVf+JS6 bscrjE+k2dXkp7C89uoerNHcyiD8EOgxV9PKYDD4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53566: netfilter: nft_set_rbtree: fix null deref on element insertion Date: Sat, 4 Oct 2025 17:17:20 +0200 Message-ID: <2025100451-CVE-2023-53566-1c57@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3086; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=b+cnr2f0DjQGjFgwG81wQPHu9qwx8PIE6LNmJ37aYBw=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPrVJOJd5Yu6Zv/vZ1r05/+XJjVfBf+3mp2Rs+WVzwf bxqU9ye4o5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYyPYmhgXndE/wmqR5PmW4 WyAomKDaqGdk0s+wYEPbl5Mnv/1a98wiOHI7h5lt11qDGgA= 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: nft_set_rbtree: fix null deref on element insertion There is no guarantee that rb_prev() will not return NULL in nft_rbtree_gc_elem(): general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] nft_add_set_elem+0x14b0/0x2990 nf_tables_newsetelem+0x528/0xb30 Furthermore, there is a possible use-after-free while iterating, 'node' can be free'd so we need to cache the next value to use. The Linux kernel CVE team has assigned CVE-2023-53566 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.166 with commit 4aacf3d78424293e318c616016865380b37b9cc5 and fixed in 5.10.181 with commit 3fa13203b6d90cc3a33af47b058739f92ab82eef Issue introduced in 5.15.91 with commit 2bf1435fa19d2c58054391b3bba40d5510a5758c and fixed in 5.15.113 with commit ec5caa765f7f6960011c919c9aeb1467940421f6 Issue introduced in 6.1.9 with commit 318cb24a4c3fce8140afaf84e4d45fcb76fb280b and fixed in 6.1.30 with commit a836be60a3aabcedcd9c79f545d409ace1f20ba6 Issue introduced in 6.2 with commit c9e6978e2725a7d4b6cd23b2facd3f11422c0643 and fixed in 6.3.4 with commit a337706c1fb35aac3f26b48aca80421bdbe1d33a Issue introduced in 6.2 with commit c9e6978e2725a7d4b6cd23b2facd3f11422c0643 and fixed in 6.4 with commit 61ae320a29b0540c16931816299eb86bf2b66c08 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-2023-53566 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/nft_set_rbtree.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/b76db53ee8802ee5683f8cb401d7e2ec6f9b3d56 https://git.kernel.org/stable/c/899aa5638568abf5d69de7a7bb95e4615157375b https://git.kernel.org/stable/c/3fa13203b6d90cc3a33af47b058739f92ab82eef https://git.kernel.org/stable/c/ec5caa765f7f6960011c919c9aeb1467940421f6 https://git.kernel.org/stable/c/a836be60a3aabcedcd9c79f545d409ace1f20ba6 https://git.kernel.org/stable/c/a337706c1fb35aac3f26b48aca80421bdbe1d33a https://git.kernel.org/stable/c/61ae320a29b0540c16931816299eb86bf2b66c08