netfilter: nf_queue: pin bridge device while NFQUEUE holds fake dst
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.270, 5.15.217, 6.1.178, 6.6.145, 6.12.97, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_queue: pin bridge device while NFQUEUE holds fake dst The br_netfilter fake rtable is embedded in struct net_bridge and is attached to bridged packets with skb_dst_set_noref(). If such a packet is queued to NFQUEUE, __nf_queue() upgrades that fake dst with skb_dst_force(). At that point the queued skb can hold a real dst reference after bridge teardown has started. The problem is not that every bridged packet needs its own dst reference. The problem is that NFQUEUE can keep the bridge private fake dst alive after unregister begins. Fix this by keeping the bridge fake dst model unchanged and pinning the bridge master device only while the packet sits in NFQUEUE. Record the bridge device in nf_queue_entry when the queued skb carries a bridge fake dst, take a device reference for the queue lifetime, and drop it when the queue entry is freed. Also make sure queued entries are reaped when that bridge device goes down, and drop the redundant nf_bridge_info_exists() test from the fake dst detection. This keeps netdev_priv(br->dev) alive until verdict completion, so the embedded fake rtable and its metrics backing storage cannot be freed out from under dst_release(). It also avoids the constant refcount bump and avoids using ipv4-specific dst helpers for IPv6 bridge traffic.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in 4e56d3d60d3192ef0a0c08e8b433636690189384; From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in 8dc51351472825500145eed5bddfb88b2ec32008; From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in 430521af7fe8a9c08f5a2554224a35f11f51d99e; From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in 3f03a2d225c668283110ad5f9ff159ba4591e2c7; From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in 01ace27af47801dd7f6b839e782b62863af979cc; From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in 0ca505346c5e2905ab7b5313af801fcf38f594a8; From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in 47b3af24de5fbed4bf2952de0f5294ef1a338a26; From 34666d467cbf1e2e3c7bb15a63eccfb582cdd71f · fixed in c9c9b37f8c5505224e8d206184df3bb668ee00cf
- Linux Linux
3.18
- KernelLinux
From 3.18.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.217; From 5.16.0 · fixed in 6.1.178; From 6.2.0 · fixed in 6.6.145; From 6.7.0 · fixed in 6.12.97; From 6.13.0 · fixed in 6.18.40; From 6.19.0 · fixed in 7.1.5
References 8
git.kernel.org
- stable/c/4e56d3d60d3192ef0a0c08e8b433636690189384
- stable/c/8dc51351472825500145eed5bddfb88b2ec32008
- stable/c/430521af7fe8a9c08f5a2554224a35f11f51d99e
- stable/c/3f03a2d225c668283110ad5f9ff159ba4591e2c7
- stable/c/01ace27af47801dd7f6b839e782b62863af979cc
- stable/c/0ca505346c5e2905ab7b5313af801fcf38f594a8
- stable/c/47b3af24de5fbed4bf2952de0f5294ef1a338a26
- stable/c/c9c9b37f8c5505224e8d206184df3bb668ee00cf