CVE-2025-40297
net: bridge: fix use-after-free due to MST port state bypass
Mitigation
- Upgrade Linux to 8dca36978aa80bab9d4da130c211db75c9e00048 or later.
Who should check
- Anyone running Linux >= ec7328b59176227216c461601c6bd0e922232a9b, < e19085b2a86addccff33ab8536fc67ebd9d52198; >= ec7328b59176227216c461601c6bd0e922232a9b, < 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8; >= ec7328b59176227216c461601c6bd0e922232a9b, < bf3843183bc3158e5821b46f330c438ae9bd6ddb; >= ec7328b59176227216c461601c6bd0e922232a9b, < 991fbe1680cd41a5f97c92cd3a3496315df36e4b; >= ec7328b59176227216c461601c6bd0e922232a9b, < 8dca36978aa80bab9d4da130c211db75c9e00048
- Anyone running Linux 5.18
Vulnerability facts
- Affected
- Linux >= ec7328b59176227216c461601c6bd0e922232a9b, < e19085b2a86addccff33ab8536fc67ebd9d52198; >= ec7328b59176227216c461601c6bd0e922232a9b, < 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8; >= ec7328b59176227216c461601c6bd0e922232a9b, < bf3843183bc3158e5821b46f330c438ae9bd6ddb; >= ec7328b59176227216c461601c6bd0e922232a9b, < 991fbe1680cd41a5f97c92cd3a3496315df36e4b; >= ec7328b59176227216c461601c6bd0e922232a9b, < 8dca36978aa80bab9d4da130c211db75c9e00048; Linux 5.18
- Fixed in
- Linux 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8, Linux 991fbe1680cd41a5f97c92cd3a3496315df36e4b, Linux 8dca36978aa80bab9d4da130c211db75c9e00048
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.24% chance of exploitation in 30 days (percentile 9, 2026-11-26)
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: net: bridge: fix use-after-free due to MST port state bypass syzbot reported[1] a use-after-free when deleting an expired fdb. It is due to a race condition between learning still happening and a port being deleted, after all its fdbs have been flushed. The port's state has been toggled to disabled so no learning should happen at that time, but if we have MST enabled, it will bypass the port's state, that together with VLAN filtering disabled can lead to fdb learning at a time when it shouldn't happen while the port is being deleted. VLAN filtering must be disabled because we flush the port VLANs when it's being deleted which will stop learning. This fix adds a check for the port's vlan group which is initialized to NULL when the port is getting deleted, that avoids the port state bypass. When MST is enabled there would be a minimal new overhead in the fast-path because the port's vlan group pointer is cache-hot. [1] https://syzkaller.appspot.com/bug?extid=dd280197f0f7ab3917be
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= ec7328b59176227216c461601c6bd0e922232a9b, < e19085b2a86addccff33ab8536fc67ebd9d52198; >= ec7328b59176227216c461601c6bd0e922232a9b, < 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8; >= ec7328b59176227216c461601c6bd0e922232a9b, < bf3843183bc3158e5821b46f330c438ae9bd6ddb; >= ec7328b59176227216c461601c6bd0e922232a9b, < 991fbe1680cd41a5f97c92cd3a3496315df36e4b; >= ec7328b59176227216c461601c6bd0e922232a9b, < 8dca36978aa80bab9d4da130c211db75c9e00048 | — | cvelist |
| Linux | 5.18 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-40297. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-40297.md Affected: Linux >= ec7328b59176227216c461601c6bd0e922232a9b, < e19085b2a86addccff33ab8536fc67ebd9d52198; >= ec7328b59176227216c461601c6bd0e922232a9b, < 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8; >= ec7328b59176227216c461601c6bd0e922232a9b, < bf3843183bc3158e5821b46f330c438ae9bd6ddb; >= ec7328b59176227216c4616… Fixed in: Linux 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8, Linux 991fbe1680cd41a5f97c92cd3a3496315df36e4b, Linux 8dca36978aa80bab9d4da130c211db75c9e00048 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Other
- https://git.kernel.org/stable/c/e19085b2a86addccff33ab8536fc67ebd9d52198
- https://git.kernel.org/stable/c/3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8
- https://git.kernel.org/stable/c/bf3843183bc3158e5821b46f330c438ae9bd6ddb
- https://git.kernel.org/stable/c/991fbe1680cd41a5f97c92cd3a3496315df36e4b
- https://git.kernel.org/stable/c/8dca36978aa80bab9d4da130c211db75c9e00048
FAQ
Is CVE-2025-40297 being exploited?
There is no confirmed exploitation: CVE-2025-40297 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-40297?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-40297?
Linux >= ec7328b59176227216c461601c6bd0e922232a9b, < e19085b2a86addccff33ab8536fc67ebd9d52198; >= ec7328b59176227216c461601c6bd0e922232a9b, < 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8; >= ec7328b59176227216c461601c6bd0e922232a9b, < bf3843183bc3158e5821b46f330c438ae9bd6ddb; >= ec7328b59176227216c461601c6bd0e922232a9b, < 991fbe1680cd41a5f97c92cd3a3496315df36e4b; >= ec7328b59176227216c461601c6bd0e922232a9b, < 8dca36978aa80bab9d4da130c211db75c9e00048; Linux 5.18.
Is there a fix for CVE-2025-40297?
Yes. Fixed in Linux 3b60ce334c1ce8b3fad7e02dcd5ed9f6646477c8, Linux 991fbe1680cd41a5f97c92cd3a3496315df36e4b, Linux 8dca36978aa80bab9d4da130c211db75c9e00048. Upgrade Linux to 8dca36978aa80bab9d4da130c211db75c9e00048 or later.
How do I check if I'm affected by CVE-2025-40297?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.