HIGH
bridge MST VLAN UAF
CVE-2024-40920
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: net: bridge: mst: fix suspicious rcu usage in br_mst_set_state I converted br_mst_set_state to RCU to avoid a vlan use-after-free but forgot to change the vlan group dereference helper. Switch to vlan group RCU deref helper to fix the suspicious rcu usage warning.
02KernelScan AI Analysis
Risk summary
A use-after-free vulnerability in the Linux bridge MST implementation could allow local attackers with network configuration privileges to cause system crashes or potentially execute arbitrary code by manipulating bridge port states to trigger access to freed VLAN group memory.
Vulnerability analysis
Summary: The br_mst_set_state function in the Linux bridge MST (Multiple Spanning Tree) implementation contains a use-after-free vulnerability due to incorrect RCU (Read-Copy-Update) usage when dereferencing VLAN group structures.
Root Cause: The function was converted to use RCU protection to prevent VLAN use-after-free issues, but the developer forgot to update the VLAN group dereference helper from nbp_vlan_group() to nbp_vlan_group_rcu(). This creates a mismatch where the code is running under RCU read lock but using a non-RCU-safe dereference helper, potentially accessing freed memory.
Attack Surface: This vulnerability affects bridge networking functionality and requires local access to trigger MST state changes. The attack surface is limited to systems using bridge MST features and requires the ability to manipulate bridge port states, typically requiring elevated privileges or network configuration access.
Fix Mechanism: The patch changes the VLAN group dereference from nbp_vlan_group(p) to nbp_vlan_group_rcu(p) to use the proper RCU-safe helper function that matches the RCU read lock context already established in the function.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.1 | 6.1.95 | 7caefa277172 |
| 6.6 | 6.6.35 | 406bfc04b01e |
| 6.9 | 6.9.6 | caaa2129784a |