Linux Netfilter nft_set_elem_init Type Confusion and Local Privilege Escalation
CVE-2022-34918 is a type-confusion vulnerability in the Linux kernel Netfilter nftables subsystem, affecting kernels through version 5.18.9. Incorrect handling of set-element data in nft_set_elem_init() can cause a heap buffer overflow. A local attacker with CAP_NET_ADMIN in an appropriate network namespace can exploit the flaw to escalate privileges to root; an unprivileged attacker can obtain the required capability through user and network namespaces. The vulnerability is distinct from CVE-2022-32250.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows a local attacker to escalate privileges to root, compromising system confidentiality and integrity. Kernel heap corruption can also disrupt availability or crash the system.
If you can’t patch tonight, do this now.
Restrict unprivileged creation of user and network namespaces where operationally feasible, preventing ordinary local users from obtaining the namespace-scoped CAP_NET_ADMIN capability needed for this exploitation route. Avoid granting CAP_NET_ADMIN to untrusted workloads. These restrictions reduce exposure but do not replace patching or protect against attackers who already possess the required capability.
Patch, then assume compromise.
Install a vendor-supported kernel update that fixes CVE-2022-34918 and reboot into the updated kernel. The upstream fix modifies nft_setelem_parse_data() and was included in Linux 5.19-rc6. RHEL 9 fixes were issued through RHSA-2022:6582, RHSA-2022:6592, and RHSA-2022:6610. For applicable RHEL 9 x86_64 real-time kernel channels, the fixed kernel-rt package is 5.14.0-70.26.1.rt21.98.el9_0; use that version or a superseding vendor update.
4 exploits validated by Mallory's analysis.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.