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 8063F2BEC30 for ; Wed, 18 Jun 2025 11:16:13 +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=1750245373; cv=none; b=K16vraBGbwMkC8khf3yvz6tR7lvhhff7+ZZYlWGLF2Vmr7XDwQwIVhQ1oqYDZ0jBxcV8qRdbKuIOOaaxqCTupGwMYk+UVRQALtJNSfrpcpVw1QQhs2hYfyCYYDWO6yBgZQSFIh+GsT5KM+KTzjoS6E81nJtUO+uAiAXPO9D+zQA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245373; c=relaxed/simple; bh=YQOWkWcC12/f+zgWPEKa9bC1OLgRqdR0wQwsBRChbCY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WPEOw9KkP+t+GH8gNuujjSeKdtBLPWt2hLbadjAyfxMEDn7omiDJ9Y1tNaGGvE5dUzBTK3SXG9GX5j7w3tZa4xVu8qpVZ4GMZiIvbUzJuiMREwKLD/a44yWw2nvTcmyivGqwv22kuG4NGhqo6zXdaQnOQHRkC7ezfvpaz5giyvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Fvg1KtVO; 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="Fvg1KtVO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8388C4CEE7; Wed, 18 Jun 2025 11:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245373; bh=YQOWkWcC12/f+zgWPEKa9bC1OLgRqdR0wQwsBRChbCY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Fvg1KtVO+7H/g+YMBP2jeu1UG7n1jqrcNpfxPpgbR0Nz8POwuyToSf3NIN7xqiSkw KgvOoYvHOwDdCgu/lPsl9pcljzz6ZST9IJ46LAE3gaPUP+jkT7UKvCC7r9A5SlhJr1 gj/LSVyL2MDQUmuihPNywhkPB2R71Bb5CG+xpAmI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50213: netfilter: nf_tables: do not allow SET_ID to refer to another table Date: Wed, 18 Jun 2025 13:04:38 +0200 Message-ID: <2025061844-CVE-2022-50213-bc19@gregkh> X-Mailer: git-send-email 2.49.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=3363; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3gSfof6BZUzpj7XJ5gYYwz0XdZUD5P0sTclGkGlmyM4=; b=kA0DAAIRMUfUDdst+ykByyZiAGhSnJjIpR0A842GxY0nTXFhhPWaMBDgRyPP9aCKSEDev01UA 4hdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmhSnJgACgkQMUfUDdst+ylAjwCgw7Nt QbFBO00r+1zoU/+TLAslnUgAnRFrNrMMm9Xjx5VpM4M68lK2hAw8 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: do not allow SET_ID to refer to another table When doing lookups for sets on the same batch by using its ID, a set from a different table can be used. Then, when the table is removed, a reference to the set may be kept after the set is freed, leading to a potential use-after-free. When looking for sets by ID, use the table that was used for the lookup by name, and only return sets belonging to that same table. This fixes CVE-2022-2586, also reported as ZDI-CAN-17470. The Linux kernel CVE team has assigned CVE-2022-50213 to this issue. Affected and fixed versions =========================== Issue introduced in 3.16 with commit 958bee14d0718ca7a5002c0f48a099d1d345812a and fixed in 4.19.256 with commit 77d3b5038b7462318f5183e2ad704b01d57215a2 Issue introduced in 3.16 with commit 958bee14d0718ca7a5002c0f48a099d1d345812a and fixed in 5.4.211 with commit fab2f61cc3b0e441b1749f017cfee75f9bbaded7 Issue introduced in 3.16 with commit 958bee14d0718ca7a5002c0f48a099d1d345812a and fixed in 5.10.137 with commit 1a4b18b1ff11ba26f9a852019d674fde9d1d1cff Issue introduced in 3.16 with commit 958bee14d0718ca7a5002c0f48a099d1d345812a and fixed in 5.15.61 with commit faafd9286f1355c76fe9ac3021c280297213330e Issue introduced in 3.16 with commit 958bee14d0718ca7a5002c0f48a099d1d345812a and fixed in 5.18.18 with commit f4fa03410f7c5f5bd8f90e9c11e9a8c4b526ff6f Issue introduced in 3.16 with commit 958bee14d0718ca7a5002c0f48a099d1d345812a and fixed in 5.19.2 with commit 0d07039397527361850c554c192e749cfc879ea9 Issue introduced in 3.16 with commit 958bee14d0718ca7a5002c0f48a099d1d345812a and fixed in 6.0 with commit 470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2 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-2022-50213 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/77d3b5038b7462318f5183e2ad704b01d57215a2 https://git.kernel.org/stable/c/fab2f61cc3b0e441b1749f017cfee75f9bbaded7 https://git.kernel.org/stable/c/1a4b18b1ff11ba26f9a852019d674fde9d1d1cff https://git.kernel.org/stable/c/faafd9286f1355c76fe9ac3021c280297213330e https://git.kernel.org/stable/c/f4fa03410f7c5f5bd8f90e9c11e9a8c4b526ff6f https://git.kernel.org/stable/c/0d07039397527361850c554c192e749cfc879ea9 https://git.kernel.org/stable/c/470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2