PoC Released for Linux Kernel Bridge STP Use-After-Free Flaw Enabling Control-Flow Hijacking

A proof-of-concept (PoC) has been released for a use-after-free vulnerability affecting the Linux kernel’s software bridge implementation, specifically its Spanning Tree Protocol (STP) timer handling.

The flaw can leave queued STP timers pointing to freed bridge memory, potentially creating a control-flow hijacking primitive under suitable conditions.

Researchers n132 and Sven Sze reportedly identified and submitted the vulnerability during TyphoonPWN 2026, where their work earned second place in the Linux privilege-escalation category.

PoC Released for Linux Kernel Bridge STP Use-After-Free Flaw

The affected component resides in the Linux bridge driver under net/bridge, which manages software Ethernet bridges and STP state transitions.

Each bridge maintains periodic timers including hello_timer, tcn_timer, topology_change_timer, and multiple port-specific timers.

These timer objects are embedded within struct net_bridge, which is allocated as private data inside the bridge interface’s backing net_device.

As a result, their lifetime is directly tied to that network-device allocation. If a bridge interface is released while one of its STP timers remains queued, the kernel timer subsystem can later access freed memory.

The vulnerability occurs when kernel STP is enabled on a bridge that remains administratively down while an attached port is transitioned into the LEARNING state.

According to the disclosure, this transition can arm periodic STP timers even when the bridge lacks the IFF_UP flag. The root cause is an inconsistency between normal interface shutdown and direct bridge deletion.

During a conventional UP-to-DOWN transition, the bridge’s ndo_stop path invokes br_dev_stop(), followed by br_stp_disable_bridge().

This routine synchronously cancels STP timers through del_timer_sync(), ensuring the timer callbacks cannot execute after the bridge structure is freed. However, deleting a bridge through the dellink path follows a different route.

The br_dev_delete() function does not call br_stp_disable_bridge(), while unregister_netdevice_many() can skip the ndo_stop callback entirely if the device is already in a DOWN state.

Consequently, a bridge may be freed with active STP timers still linked to a per-CPU timer base. When the timer subsystem later processes its queue in softirq context, the kernel can dereference a timer object located in reclaimed slab memory.

The released PoC demonstrates the preconditions necessary to trigger the stale timer condition through netlink-driven bridge and interface operations. The freed object is associated with the kmalloc-cg-8k slab cache, making allocation reuse a key exploitation consideration.

SSD-Disclosure noted that when the dangling timer fires, the timer framework calls the function pointer stored in the timer structure while passing a pointer to the timer object.

If an attacker can reliably reclaim the freed allocation with controlled data before callback execution, the condition may enable control-flow hijacking.

Practical exploitation would still depend on kernel configuration, heap behavior, namespace permissions, hardening features, and the attacker’s ability to manipulate relevant networking objects.

Patch and Mitigation

Linux maintainers have introduced a patch addressing the vulnerable lifecycle handling in commit 2a00517db8de4be7df3d483b215c5544fb30a191. Systems running kernel versions prior to the inclusion of this change should be treated as potentially affected.

Administrators should update to a kernel release containing the patch, restrict untrusted users’ ability to create or manipulate network namespaces and bridge devices, and monitor for unusual netlink activity involving bridge creation, STP configuration, port-state changes, and rapid interface deletion.

Detect, investigate, and respond faster with in-browser data inspection from ANY.RUN. Gain complete phishing visibility to strengthen your SOC and reduce MTTR   

Tamilselvan
Tamilselvanhttps://cyberpress.org/
Tamilselvan is an Investigative cybersecurity journalist dedicated to breaking stories on ransomware cartels, data breaches, and state-sponsored espionage.

Trending News

Related Stories