HIGH Introduced in 5.15
bridge MasterVlan UAF
CVE-2026-80842
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: net: bridge: mcast: fix use-after-free of a master VLAN's multicast context br_multicast_toggle_one_vlan() clears BR_VLFLAG_MCAST_ENABLED under br->multicast_lock before stopping a VLAN's multicast context. That is the teardown handshake: lockless readers gate on the flag through br_multicast_ctx_should_use() -> br_multicast_ctx_vlan_disabled(), so once it is cleared under the lock no reader can arm the context again. For a master VLAN the handshake never runs. __vlan_del() clears BRIDGE_VLAN_INFO_BRENTRY before calling br_vlan_put_master(), so br_multicast_toggle_one_vlan(masterv, false) returns early on !br_vlan_is_brentry(vlan): the flag stays set and br->multicast_lock is never taken. br_vlan_put_master() then drains the context in br_multicast_ctx_deinit() and frees the VLAN through call_rcu(), while a reader still inside rcu_read_lock() sees the context as enabled and re-arms it. The port and port-VLAN branch of the function has no br_vlan_is_brentry() test and flips the flag under br->multicast_lock, so it is not affected. The reader is the bridge transmit path. For a master VLAN br_multicast_rcv() selects brmctx = &vlan->br_mcast_ctx with pmctx = NULL, so IGMP sent to the bridge device re-arms the context's timers after br_multicast_ctx_deinit() has already stopped them. BUG: KASAN: slab-use-after-free in detach_if_pending+0x412/0x4a0 Write of size 8 at addr ffff88810ac39918 by task brmc/601 __mod_timer+0x51a/0xc50 br_multicast_host_join+0x25b/0x390 __br_multicast_add_group+0x468/0x530 br_ip4_multicast_add_group+0x1a0/0x260 br_multicast_rcv+0x2cda/0x61e0 br_dev_xmit+0x6c4/0x1540 Allocated by task 610: br_vlan_add+0x111/0xb40 br_vlan_info+0x370/0x3e0 Freed by task 0: kfree+0x1a7/0x4f0 rcu_core+0x7dc/0x10a0 Only test br_vlan_is_brentry() when enabling, like the br_multicast_ctx_vlan_global_disabled() test next to it. Disabling then always clears BR_VLFLAG_MCAST_ENABLED under br->multicast_lock before br_multicast_ctx_deinit() drains the context.
02KernelScan AI Analysis
Risk summary
A local attacker who can create user namespaces (and thus obtain CAP_NET_ADMIN in a network namespace) can trigger a use-after-free in the Linux bridge multicast subsystem by racing VLAN deletion against IGMP packet processing. The resulting kernel heap corruption can lead to privilege escalation from container or user-namespace context to full kernel compromise, as well as kernel panics. Systems that do not use bridge networking or that block unprivileged user namespace creation are not exposed.
Vulnerability analysis
When a master VLAN is deleted from a bridge, the multicast teardown handshake is supposed to clear a flag under the bridge multicast lock so that no lockless reader can re-arm the multicast context before it is drained and freed. However, an early-return check in the toggle function causes this flag-clearing step to be skipped for master VLANs that are no longer marked as bridge entries — exactly the state they are in during deletion. As a result, the bridge transmit path can still see the multicast context as enabled while processing an IGMP packet and re-arm its timers after the context has already been torn down and the underlying VLAN memory scheduled for freeing via RCU, producing a use-after-free write. The fix restricts the early-return check to the enable path only, so disabling always clears the flag under the lock before the context is drained, closing the race window. An attacker needs local access with the ability to configure bridge VLANs and inject IGMP packets into the bridge device; on systems allowing unprivileged user namespaces, this is reachable by a non-root user who obtains CAP_NET_ADMIN inside a user namespace.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 5.15 | 5.15.220 | 3afaaee2f972 |
| 6.1 | 5.15 | 6.1.187 | 22226a2c3b90 |
| 6.12 | 5.15 | 6.12.108 | 3a0ad4fcdfa0 |
| 6.18 | 5.15 | 6.18.49 | c069f29da723 |
| 6.6 | 5.15 | 6.6.156 | 7c54fd8cfbcf |
| 7.1 | 5.15 | 7.1.13 | 3f4752996735 |
| 7.2 | 5.15 | 7.2.3 | 57f94d3f4dee |
| mainline | 5.15 | 7.3 | 50e5c6605cc9 |
| cip/6.1 | 5.15 | 6.1.187-cip60 | 22226a2c3b90 |
| cip/6.1-rt | 5.15 | 6.1.189-cip61-rt32 | 22226a2c3b90 |
| cip/6.12 | 5.15 | 6.12.108-cip31 | 3a0ad4fcdfa0 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.108-cip31 |
| cip/6.1 | Fixed in 6.1.187-cip60 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |