# CVE-2025-37864: net: dsa: clean up FDB, MDB, VLAN entries on unbind

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-617
- **Published:** 2025-05-09T06:43:54.873Z
- **Modified:** 2026-06-17T09:15:35.613Z

## Who should check

- Anyone running Linux \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 5e531e71b9d21d5e985251440e0d722f71299b7a; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 86c6613a69bca815f1865ed8cedfd4b9142621ab; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 8fcc1e6f808912977caf17366c625b95dc29ba4f; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 99c50c98803425378e08a7394dc885506dc85f06; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 7afb5fb42d4950f33af2732b8147c552659f79b7
- Anyone running Linux 5.18

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: dsa: clean up FDB, MDB, VLAN entries on unbind

As explained in many places such as commit b117e1e8a86d ("net: dsa:
delete dsa\_legacy\_fdb\_add and dsa\_legacy\_fdb\_del"), DSA is written given
the assumption that higher layers have balanced additions/deletions.
As such, it only makes sense to be extremely vocal when those
assumptions are violated and the driver unbinds with entries still
present.

But Ido Schimmel points out a very simple situation where that is wrong:
https://lore.kernel.org/netdev/ZDazSM5UsPPjQuKr@shredder/
(also briefly discussed by me in the aforementioned commit).

Basically, while the bridge bypass operations are not something that DSA
explicitly documents, and for the majority of DSA drivers this API
simply causes them to go to promiscuous mode, that isn't the case for
all drivers. Some have the necessary requirements for bridge bypass
operations to do something useful - see dsa\_switch\_supports\_uc\_filtering().

Although in tools/testing/selftests/net/forwarding/local\_termination.sh,
we made an effort to popularize better mechanisms to manage address
filters on DSA interfaces from user space - namely macvlan for unicast,
and setsockopt(IP\_ADD\_MEMBERSHIP) - through mtools - for multicast, the
fact is that 'bridge fdb add ... self static local' also exists as
kernel UAPI, and might be useful to someone, even if only for a quick
hack.

It seems counter-productive to block that path by implementing shim
.ndo\_fdb\_add and .ndo\_fdb\_del operations which just return -EOPNOTSUPP
in order to prevent the ndo\_dflt\_fdb\_add() and ndo\_dflt\_fdb\_del() from
running, although we could do that.

Accepting that cleanup is necessary seems to be the only option.
Especially since we appear to be coming back at this from a different
angle as well. Russell King is noticing that the WARN\_ON() triggers even
for VLANs:
https://lore.kernel.org/netdev/Z\_li8Bj8bD4-BYKQ@shell.armlinux.org.uk/

What happens in the bug report above is that dsa\_port\_do\_vlan\_del() fails,
then the VLAN entry lingers on, and then we warn on unbind and leak it.

This is not a straight revert of the blamed commit, but we now add an
informational print to the kernel log (to still have a way to see
that bugs exist), and some extra comments gathered from past years'
experience, to justify the logic.

## Affected and fixed versions

- Linux: \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 5e531e71b9d21d5e985251440e0d722f71299b7a; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 86c6613a69bca815f1865ed8cedfd4b9142621ab; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 8fcc1e6f808912977caf17366c625b95dc29ba4f; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 99c50c98803425378e08a7394dc885506dc85f06; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 7afb5fb42d4950f33af2732b8147c552659f79b7 (cvelist)
- Linux: 5.18 (cvelist)

## Mitigation

- Upgrade Linux to 7afb5fb42d4950f33af2732b8147c552659f79b7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-37864. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-37864.md
Affected: Linux >= 0832cd9f1f023226527e95002d537123061ddac4, < 5e531e71b9d21d5e985251440e0d722f71299b7a; >= 0832cd9f1f023226527e95002d537123061ddac4, < 86c6613a69bca815f1865ed8cedfd4b9142621ab; >= 0832cd9f1f023226527e95002d537123061ddac4, < 8fcc1e6f808912977caf17366c625b95dc29ba4f; >= 0832cd9f1f023226527e950…
Fixed in: Linux 5e531e71b9d21d5e985251440e0d722f71299b7a, Linux 86c6613a69bca815f1865ed8cedfd4b9142621ab, Linux 8fcc1e6f808912977caf17366c625b95dc29ba4f, Linux 99c50c98803425378e08a7394dc885506dc85f06, Linux 7afb5fb42d4950f33af2732b8147c552659f79b7

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.
```

## FAQ

### Is CVE-2025-37864 being exploited?

There is no confirmed exploitation: CVE-2025-37864 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-37864?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-37864?

Linux \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 5e531e71b9d21d5e985251440e0d722f71299b7a; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 86c6613a69bca815f1865ed8cedfd4b9142621ab; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 8fcc1e6f808912977caf17366c625b95dc29ba4f; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 99c50c98803425378e08a7394dc885506dc85f06; \>= 0832cd9f1f023226527e95002d537123061ddac4, \< 7afb5fb42d4950f33af2732b8147c552659f79b7; Linux 5.18.

### Is there a fix for CVE-2025-37864?

Yes. Fixed in Linux 5e531e71b9d21d5e985251440e0d722f71299b7a, Linux 86c6613a69bca815f1865ed8cedfd4b9142621ab, Linux 8fcc1e6f808912977caf17366c625b95dc29ba4f, Linux 99c50c98803425378e08a7394dc885506dc85f06, Linux 7afb5fb42d4950f33af2732b8147c552659f79b7. Upgrade Linux to 7afb5fb42d4950f33af2732b8147c552659f79b7 or later.

### How do I check if I'm affected by CVE-2025-37864?

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.

## References

- patch: <https://git.kernel.org/stable/c/86c6613a69bca815f1865ed8cedfd4b9142621ab>
- patch: <https://git.kernel.org/stable/c/8fcc1e6f808912977caf17366c625b95dc29ba4f>
- patch: <https://git.kernel.org/stable/c/99c50c98803425378e08a7394dc885506dc85f06>
- patch: <https://git.kernel.org/stable/c/7afb5fb42d4950f33af2732b8147c552659f79b7>
- other: <https://git.kernel.org/stable/c/5e531e71b9d21d5e985251440e0d722f71299b7a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-37864>

HTML: <https://flawdb.com/CVE-2025-37864> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-37864>
