{"id":"CVE-2022-50213","state":"PUBLISHED","title":"netfilter: nf_tables: do not allow SET_ID to refer to another table","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_tables: do not allow SET_ID to refer to another table\n\nWhen doing lookups for sets on the same batch by using its ID, a set from a\ndifferent table can be used.\n\nThen, when the table is removed, a reference to the set may be kept after\nthe set is freed, leading to a potential use-after-free.\n\nWhen looking for sets by ID, use the table that was used for the lookup by\nname, and only return sets belonging to that same table.\n\nThis fixes CVE-2022-2586, also reported as ZDI-CAN-17470.","publishedAt":"2025-06-18T11:03:50.958Z","updatedAt":"2026-08-05T08:57:42.866Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"77d3b5038b7462318f5183e2ad704b01d57215a2","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"fab2f61cc3b0e441b1749f017cfee75f9bbaded7","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"1a4b18b1ff11ba26f9a852019d674fde9d1d1cff","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"faafd9286f1355c76fe9ac3021c280297213330e","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"f4fa03410f7c5f5bd8f90e9c11e9a8c4b526ff6f","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"0d07039397527361850c554c192e749cfc879ea9","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.16","versionType":"semver"},{"version":"4.19.256","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.211","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.137","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.61","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.18.18","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]}],"references":["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"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50213.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50213","state":"PUBLISHED","datePublished":"2025-06-18T11:03:50.958Z","dateUpdated":"2026-08-05T08:57:42.866Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-06-18T10:57:27.429Z"},"containers":{"cna":{"title":"netfilter: nf_tables: do not allow SET_ID to refer to another table","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_tables: do not allow SET_ID to refer to another table\n\nWhen doing lookups for sets on the same batch by using its ID, a set from a\ndifferent table can be used.\n\nThen, when the table is removed, a reference to the set may be kept after\nthe set is freed, leading to a potential use-after-free.\n\nWhen looking for sets by ID, use the table that was used for the lookup by\nname, and only return sets belonging to that same table.\n\nThis fixes CVE-2022-2586, also reported as ZDI-CAN-17470."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"77d3b5038b7462318f5183e2ad704b01d57215a2","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"fab2f61cc3b0e441b1749f017cfee75f9bbaded7","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"1a4b18b1ff11ba26f9a852019d674fde9d1d1cff","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"faafd9286f1355c76fe9ac3021c280297213330e","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"f4fa03410f7c5f5bd8f90e9c11e9a8c4b526ff6f","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"0d07039397527361850c554c192e749cfc879ea9","versionType":"git"},{"version":"958bee14d0718ca7a5002c0f48a099d1d345812a","status":"affected","lessThan":"470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.16","versionType":"semver"},{"version":"4.19.256","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.211","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.137","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.61","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.18.18","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/netfilter/nf_tables_api.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/77d3b5038b7462318f5183e2ad704b01d57215a2"},{"url":"https://git.kernel.org/stable/c/fab2f61cc3b0e441b1749f017cfee75f9bbaded7"},{"url":"https://git.kernel.org/stable/c/1a4b18b1ff11ba26f9a852019d674fde9d1d1cff"},{"url":"https://git.kernel.org/stable/c/faafd9286f1355c76fe9ac3021c280297213330e"},{"url":"https://git.kernel.org/stable/c/f4fa03410f7c5f5bd8f90e9c11e9a8c4b526ff6f"},{"url":"https://git.kernel.org/stable/c/0d07039397527361850c554c192e749cfc879ea9"},{"url":"https://git.kernel.org/stable/c/470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached only through the NETLINK_NETFILTER nftables API (batch NEWSET/NEWSETELEM/DELTABLE), which requires local process access; netfilter/nftables netlink is scored Local per kernel guidance.\nAC:L - The attacker fully controls the netlink batch that creates a cross-table SET_ID reference and deletes the owning table, so the UAF is reliably triggerable with no conditions outside attacker control; public exploits confirm this.\nPR:L - nfnetlink requires CAP_NET_ADMIN via netlink_net_capable(), but that capability is available in an unprivileged user+network namespace (unshare -Urn), so Privileges Required is Low, not High.\nUI:N - Exploitation is entirely attacker-driven through crafted nftables netlink messages; no victim action is required.\nS:U - Impact is standard host kernel privilege escalation within the same OS security authority; it does not cross a VM, IOMMU, or other security boundary, so Scope remains Unchanged.\nC:H - The UAF of nft_object enables controlled reuse and arbitrary kernel reads (including KASLR leaks via obj->key.name), so Confidentiality is High per UAF guidance.\nI:H - Freed nft_object reuse allows hijacking obj->ops->eval for RIP control and arbitrary code execution/LPE (demonstrated publicly), so Integrity is High.\nA:H - The dangling object/set reference causes kernel use-after-free crashes (KASAN/oops) even without full exploitation, so Availability is High."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:57:42.866Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"4.19.256"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"5.4.211"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"5.10.137"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"5.15.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"5.18.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"5.19.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}