CVE-2022-50212
kernel: netfilter: nf_tables: do not allow CHAIN_ID to refer to another table
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · June 18, 2025
Updated · October 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: do not allow CHAIN_ID to refer to another table
When doing lookups for chains on the same batch by using its ID, a chain from a different table can be used. If a rule is added to a table but refers to a chain in a different table, it will be linked to the chain in table2, but would have expressions referring to objects in table1.
Then, when table1 is removed, the rule will not be removed as its linked to a chain in table2. When expressions in the rule are processed or removed, that will lead to a use-after-free.
When looking for chains by ID, use the table that was used for the lookup by name, and only return chains belonging to that same table.
Statement
This vulnerability is rated as Moderate because exploitation requires local access with the CAP_NET_ADMIN capability, which restricts exposure to privileged accounts or systems where unprivileged user namespaces are permitted. An attacker must construct a specific batch transaction that links a rule across distinct netfilter tables, triggering a use-after-free condition only when the associated table is later dismantled. Because this flaw cannot be exploited across the network and depends on strict local namespace or capability preconditions, the overall risk to typical deployments is limited.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 7CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE not specified