AZL-118454: CVE-2026-143270 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
net: bridge: disable MRP ports before the FDB flush in delnbp()
delnbp() flushes the port's FDB entries before it unregisters the RX handler. For a normal port, brstpdisableport() moves the port to BRSTATEDISABLED before this cleanup.
That does not hold for an MRP ring port. brsetstate() ignores state changes while BRMRPAWAREBIT is set, so brstpdisableport() leaves the port state alone. brmrpportdel() then restores forwarding when the bridge is up before clearing the bit. A frame received between brfdbcleanupbydst() and netdevrxhandlerunregister() can therefore create a new FDB entry referencing the dying port. Nothing removes that entry before destroynbprcu() frees the port, so a later frame to the learned MAC can be forwarded through the freed port.
Remove the MRP and CFM instances before disabling the port, so that brstpdisableport() actually transitions it to BRSTATEDISABLED. With CONFIGBRIDGEVLANFILTERING=y, synchronizenet() in nbpvlangroupunpublish() also drains receive paths that could still learn with the old state before the final FDB cleanup.
Found through an LLM-assisted source code analysis workflow and reproduced on net with KASAN and CONFIGBRIDGEVLANFILTERING=y in QEMU. A diagnostic switchdev module accepts MRP objects and delays the NETDEVCHANGEUPPER callback for 1.5 s, holding delnbp() after the FDB cleanup and before RX handler removal. The reproducer floods the MRP port with rotating source MACs, waits for the port's RCU callback through the module's rcubarrier(), then sends frames to those MACs from another port. The unpatched kernel reports:
BUG: KASAN: slab-use-after-free in brforward+0xb1/0x820 Call Trace: <IRQ> brforward+0xb1/0x820 brhandleframefinish+0x148b/0x1e50 brhandleframe+0x90a/0x15c0
With this patch, three runs of six cycles each reach the delay without a KASAN report.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
The affected path involves Linux bridge MRP ring ports during port removal. The bridge must be up, and the MRP-aware state can prevent the port from being transitioned to the disabled state during cleanup.
What conditions are needed for the use-after-free to occur?
A frame must be received after the port's FDB entries are flushed but before its receive handler is unregistered, allowing a new FDB entry to reference the port being removed. A later frame addressed to the learned MAC can then be forwarded through the freed port.
Does VLAN filtering affect the cleanup behavior?
When CONFIG_BRIDGE_VLAN_FILTERING is enabled, the fix uses synchronize_net() while unpublishing the VLAN group to drain receive paths that could still learn using the old port state before final FDB cleanup.