# CVE-2025-37865: net: dsa: mv88e6xxx: fix -ENOENT when deleting VLANs and MST is unsupported

> 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.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-908
- **Published:** 2025-05-09T06:43:55.486Z
- **Modified:** 2026-06-17T09:15:35.733Z

## Who should check

- Anyone running Linux \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 35cde75c08a1fa1a5ac0467afe2709caceeef002; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< afae9087301471970254a9180e5a26d3d8e8af09; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 9ee6d3a368ed34f2457863da3085c676e9e37a3d; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 9da4acbd60664271d34a627f7f63cd5bad8eba74; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< ea08dfc35f83cfc73493c52f63ae4f2e29edfe8d
- Anyone running Linux 5.18

## Description

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

net: dsa: mv88e6xxx: fix -ENOENT when deleting VLANs and MST is unsupported

Russell King reports that on the ZII dev rev B, deleting a bridge VLAN
from a user port fails with -ENOENT:
https://lore.kernel.org/netdev/Z\_lQXNP0s5-IiJzd@shell.armlinux.org.uk/

This comes from mv88e6xxx\_port\_vlan\_leave() -\> mv88e6xxx\_mst\_put(),
which tries to find an MST entry in &chip-\>msts associated with the SID,
but fails and returns -ENOENT as such.

But we know that this chip does not support MST at all, so that is not
surprising. The question is why does the guard in mv88e6xxx\_mst\_put()
not exit early:

	if (!sid)
		return 0;

And the answer seems to be simple: the sid comes from vlan.sid which
supposedly was previously populated by mv88e6xxx\_vtu\_get().
But some chip-\>info-\>ops-\>vtu\_getnext() implementations do not populate
vlan.sid, for example see mv88e6185\_g1\_vtu\_getnext(). In that case,
later in mv88e6xxx\_port\_vlan\_leave() we are using a garbage sid which is
just residual stack memory.

Testing for sid == 0 covers all cases of a non-bridge VLAN or a bridge
VLAN mapped to the default MSTI. For some chips, SID 0 is valid and
installed by mv88e6xxx\_stu\_setup(). A chip which does not support the
STU would implicitly only support mapping all VLANs to the default MSTI,
so although SID 0 is not valid, it would be sufficient, if we were to
zero-initialize the vlan structure, to fix the bug, due to the
coincidence that a test for vlan.sid == 0 already exists and leads to
the same (correct) behavior.

Another option which would be sufficient would be to add a test for
mv88e6xxx\_has\_stu() inside mv88e6xxx\_mst\_put(), symmetric to the one
which already exists in mv88e6xxx\_mst\_get(). But that placement means
the caller will have to dereference vlan.sid, which means it will access
uninitialized memory, which is not nice even if it ignores it later.

So we end up making both modifications, in order to not rely just on the
sid == 0 coincidence, but also to avoid having uninitialized structure
fields which might get temporarily accessed.

## Affected and fixed versions

- Linux: \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 35cde75c08a1fa1a5ac0467afe2709caceeef002; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< afae9087301471970254a9180e5a26d3d8e8af09; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 9ee6d3a368ed34f2457863da3085c676e9e37a3d; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 9da4acbd60664271d34a627f7f63cd5bad8eba74; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< ea08dfc35f83cfc73493c52f63ae4f2e29edfe8d (cvelist)
- Linux: 5.18 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-37865.md
Affected: Linux >= acaf4d2e36b3466334af4d3ee6ac254c3316165c, < 35cde75c08a1fa1a5ac0467afe2709caceeef002; >= acaf4d2e36b3466334af4d3ee6ac254c3316165c, < afae9087301471970254a9180e5a26d3d8e8af09; >= acaf4d2e36b3466334af4d3ee6ac254c3316165c, < 9ee6d3a368ed34f2457863da3085c676e9e37a3d; >= acaf4d2e36b3466334af4d3…
Fixed in: Linux 35cde75c08a1fa1a5ac0467afe2709caceeef002, Linux 9ee6d3a368ed34f2457863da3085c676e9e37a3d, Linux 9da4acbd60664271d34a627f7f63cd5bad8eba74

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-37865 being exploited?

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

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

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

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

Linux \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 35cde75c08a1fa1a5ac0467afe2709caceeef002; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< afae9087301471970254a9180e5a26d3d8e8af09; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 9ee6d3a368ed34f2457863da3085c676e9e37a3d; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< 9da4acbd60664271d34a627f7f63cd5bad8eba74; \>= acaf4d2e36b3466334af4d3ee6ac254c3316165c, \< ea08dfc35f83cfc73493c52f63ae4f2e29edfe8d; Linux 5.18.

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

Yes. Fixed in Linux 35cde75c08a1fa1a5ac0467afe2709caceeef002, Linux 9ee6d3a368ed34f2457863da3085c676e9e37a3d, Linux 9da4acbd60664271d34a627f7f63cd5bad8eba74. No fix listed yet: follow the vendor advisory.

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

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/35cde75c08a1fa1a5ac0467afe2709caceeef002>
- patch: <https://git.kernel.org/stable/c/afae9087301471970254a9180e5a26d3d8e8af09>
- patch: <https://git.kernel.org/stable/c/9ee6d3a368ed34f2457863da3085c676e9e37a3d>
- patch: <https://git.kernel.org/stable/c/9da4acbd60664271d34a627f7f63cd5bad8eba74>
- patch: <https://git.kernel.org/stable/c/ea08dfc35f83cfc73493c52f63ae4f2e29edfe8d>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>

## 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-37865>

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