Vulnerability · Published May 9, 2025 · Assigned by Linux

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

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 21% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.3%top 78.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.135-1DEBIAN-CVE-2025-37865
Debian:13linux6.12.25-1DEBIAN-CVE-2025-37865
Debian:14linux6.12.25-1DEBIAN-CVE-2025-37865
Ubuntu:24.04:LTSlinux6.8.0-100.100UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-aws6.8.0-1046.49UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-azure6.8.0-1046.52UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-azure-fde6.8.0-1046.53UBUNTU-CVE-2025-37865
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-azure-fde-6.86.8.0-1046.53~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-azure-nvidiano fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-gcp6.8.0-1047.50UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1047.50~22.04.2UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-gke6.8.0-1043.48UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1030.33UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-100.100~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-ibm6.8.0-1044.44UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1044.44~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-intelno fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-100.100.1UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-100.100.1~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1046.49UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1046.49.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1020.20UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-oracle6.8.0-1043.44UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1043.44~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-raspi6.8.0-1047.51UBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-100.100~22.04.1UBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-37865
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-37865
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1023.24UBUNTU-CVE-2025-37865

Affected products (as reported)

VendorProductVersions
Linux Linux acaf4d2e36b3466334af4d3ee6ac254c3316165c – before 35cde75c08a1fa1a5ac0467afe2709caceeef002acaf4d2e36b3466334af4d3ee6ac254c3316165c – before afae9087301471970254a9180e5a26d3d8e8af09acaf4d2e36b3466334af4d3ee6ac254c3316165c – before 9ee6d3a368ed34f2457863da3085c676e9e37a3dacaf4d2e36b3466334af4d3ee6ac254c3316165c – before 9da4acbd60664271d34a627f7f63cd5bad8eba74acaf4d2e36b3466334af4d3ee6ac254c3316165c – before ea08dfc35f83cfc73493c52f63ae4f2e29edfe8d
Linux Linux 5.18

References