CVE-2025-40297
kernel: net: bridge: fix use-after-free due to MST port state bypass
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · December 8, 2025
Updated · July 30, 2026
Description
A use-after-free was found in the Linux bridge networking code. When MST (Multiple Spanning Tree) is enabled and VLAN filtering is disabled, FDB learning can bypass the port state check during port deletion. This allows learning to occur on a port being deleted, leading to use-after-free when accessing freed FDB entries.
Statement
Exploitation requires a bridge configuration with MST enabled and VLAN filtering disabled, combined with specific timing during port deletion. Standard bridge configurations are less likely to be affected.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition