CVE-2025-37864
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).
Leer descripción completaMostrar menos
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.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Puntuación base: 5.5
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.30%
- Percentil entre todas las CVEs puntuadas: 21
- Fecha de la puntuación: 5/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (1)
CWE
- CWE-617
Referencias
- https://git.kernel.org/stable/c/5e531e71b9d21d5e985251440e0d722f71299b7a
- https://git.kernel.org/stable/c/7afb5fb42d4950f33af2732b8147c552659f79b7
- https://git.kernel.org/stable/c/86c6613a69bca815f1865ed8cedfd4b9142621ab
- https://git.kernel.org/stable/c/8fcc1e6f808912977caf17366c625b95dc29ba4f
- https://git.kernel.org/stable/c/99c50c98803425378e08a7394dc885506dc85f06
JSON original (NVD)
Mostrar
{
"id": "CVE-2025-37864",
"cveTags": [],
"metrics": {
"cvssMetricV31": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 5.5,
"attackVector": "LOCAL",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"integrityImpact": "NONE",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "LOW",
"confidentialityImpact": "NONE"
},
"impactScore": 3.6,
"exploitabilityScore": 1.8
}
]
},
"affected": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"affectedData": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "0832cd9f1f023226527e95002d537123061ddac4",
"lessThan": "5e531e71b9d21d5e985251440e0d722f71299b7a",
"versionType": "git"
},
{
"status": "affected",
"version": "0832cd9f1f023226527e95002d537123061ddac4",
"lessThan": "86c6613a69bca815f1865ed8cedfd4b9142621ab",
"versionType": "git"
},
{
"status": "affected",
"version": "0832cd9f1f023226527e95002d537123061ddac4",
"lessThan": "8fcc1e6f808912977caf17366c625b95dc29ba4f",
"versionType": "git"
},
{
"status": "affected",
"version": "0832cd9f1f023226527e95002d537123061ddac4",
"lessThan": "99c50c98803425378e08a7394dc885506dc85f06",
"versionType": "git"
},
{
"status": "affected",
"version": "0832cd9f1f023226527e95002d537123061ddac4",
"lessThan": "7afb5fb42d4950f33af2732b8147c552659f79b7",
"versionType": "git"
}
],
"programFiles": [
"net/dsa/dsa.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.18"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.18",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.1.175",
"versionType": "semver",
"lessThanOrEqual": "6.1.*"
},
{
"status": "unaffected",
"version": "6.6.88",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.25",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.14.4",
"versionType": "semver",
"lessThanOrEqual": "6.14.*"
},
{
"status": "unaffected",
"version": "6.15",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"net/dsa/dsa.c"
],
"defaultStatus": "affected"
}
]
}
],
"published": "2025-05-09T07:16:07.410",
"references": [
{
"url": "https://git.kernel.org/stable/c/5e531e71b9d21d5e985251440e0d722f71299b7a",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/7afb5fb42d4950f33af2732b8147c552659f79b7",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/86c6613a69bca815f1865ed8cedfd4b9142621ab",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/8fcc1e6f808912977caf17366c625b95dc29ba4f",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/99c50c98803425378e08a7394dc885506dc85f06",
"tags": [
"Patch"
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-617"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: dsa: clean up FDB, MDB, VLAN entries on unbind\n\nAs explained in many places such as commit b117e1e8a86d (\"net: dsa:\ndelete dsa_legacy_fdb_add and dsa_legacy_fdb_del\"), DSA is written given\nthe assumption that higher layers have balanced additions/deletions.\nAs such, it only makes sense to be extremely vocal when those\nassumptions are violated and the driver unbinds with entries still\npresent.\n\nBut Ido Schimmel points out a very simple situation where that is wrong:\nhttps://lore.kernel.org/netdev/ZDazSM5UsPPjQuKr@shredder/\n(also briefly discussed by me in the aforementioned commit).\n\nBasically, while the bridge bypass operations are not something that DSA\nexplicitly documents, and for the majority of DSA drivers this API\nsimply causes them to go to promiscuous mode, that isn't the case for\nall drivers. Some have the necessary requirements for bridge bypass\noperations to do something useful - see dsa_switch_supports_uc_filtering().\n\nAlthough in tools/testing/selftests/net/forwarding/local_termination.sh,\nwe made an effort to popularize better mechanisms to manage address\nfilters on DSA interfaces from user space - namely macvlan for unicast,\nand setsockopt(IP_ADD_MEMBERSHIP) - through mtools - for multicast, the\nfact is that 'bridge fdb add ... self static local' also exists as\nkernel UAPI, and might be useful to someone, even if only for a quick\nhack.\n\nIt seems counter-productive to block that path by implementing shim\n.ndo_fdb_add and .ndo_fdb_del operations which just return -EOPNOTSUPP\nin order to prevent the ndo_dflt_fdb_add() and ndo_dflt_fdb_del() from\nrunning, although we could do that.\n\nAccepting that cleanup is necessary seems to be the only option.\nEspecially since we appear to be coming back at this from a different\nangle as well. Russell King is noticing that the WARN_ON() triggers even\nfor VLANs:\nhttps://lore.kernel.org/netdev/Z_li8Bj8bD4-BYKQ@shell.armlinux.org.uk/\n\nWhat happens in the bug report above is that dsa_port_do_vlan_del() fails,\nthen the VLAN entry lingers on, and then we warn on unbind and leak it.\n\nThis is not a straight revert of the blamed commit, but we now add an\ninformational print to the kernel log (to still have a way to see\nthat bugs exist), and some extra comments gathered from past years'\nexperience, to justify the logic."
},
{
"lang": "es",
"value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: dsa: clean up FDB, MDB, VLAN entries on unbind Como se explica en muchos lugares como la confirmación b117e1e8a86d (\"net: dsa: delete dsa_legacy_fdb_add y dsa_legacy_fdb_del\"), DSA se escribe asumiendo que las capas superiores tienen adiciones/eliminaciones equilibradas. Como tal, solo tiene sentido ser extremadamente vocal cuando se violan esas suposiciones y el controlador se desvincula con entradas aún presentes. Pero Ido Schimmel señala una situación muy simple donde eso es incorrecto: https://lore.kernel.org/netdev/ZDazSM5UsPPjQuKr@shredder/ (también discutido brevemente por mí en la confirmación mencionada anteriormente). Básicamente, mientras que las operaciones de bypass de puente no son algo que DSA documente explícitamente, y para la mayoría de los controladores DSA esta API simplemente hace que pasen al modo promiscuo, ese no es el caso para todos los controladores. Algunos requisitos para que las operaciones de bypass de puente sean útiles (véase dsa_switch_supports_uc_filtering()). Si bien en tools/testing/selftests/net/forwarding/local_termination.sh nos esforzamos por popularizar mejores mecanismos para gestionar filtros de direcciones en interfaces DSA desde el espacio de usuario (en concreto, macvlan para unidifusión y setsockopt(IP_ADD_MEMBERSHIP) mediante mtools para multidifusión), lo cierto es que «bridge fdb add ... self static local» también existe como UAPI del kernel y podría ser útil, aunque solo sea para una modificación rápida. Parece contraproducente bloquear esa ruta implementando operaciones de shim .ndo_fdb_add y .ndo_fdb_del, que simplemente devuelven -EOPNOTSUPP para impedir la ejecución de ndo_dflt_fdb_add() y ndo_dflt_fdb_del(), aunque podríamos hacerlo. Aceptar la necesidad de una depuración parece ser la única opción. Sobre todo porque parece que también estamos abordando este tema desde una perspectiva diferente. Russell King observa que la función WARN_ON() se activa incluso para las VLAN: https://lore.kernel.org/netdev/Z_li8Bj8bD4-BYKQ@shell.armlinux.org.uk/ Lo que ocurre en el informe de error anterior es que dsa_port_do_vlan_del() falla, la entrada de la VLAN persiste y, a continuación, advertimos sobre la desvinculación y la filtramos. Esto no es una reversión directa de la confirmación criticada, sino que ahora añadimos una impresión informativa al registro del kernel (para seguir viendo la existencia de errores) y algunos comentarios adicionales recopilados de años anteriores para justificar la lógica."
}
],
"lastModified": "2026-06-17T09:15:35.613",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "2CBC0222-4DFC-46A3-85BF-7DBAB71EE14B",
"versionEndExcluding": "6.6.88",
"versionStartIncluding": "5.18"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "8E59EE65-FA6B-4AE4-8125-26135E28BF35",
"versionEndExcluding": "6.12.25",
"versionStartIncluding": "6.7"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "29FA1A8E-1C2A-4B0B-B397-2C915ECDEDEE",
"versionEndExcluding": "6.14.4",
"versionStartIncluding": "6.13"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "8D465631-2980-487A-8E65-40AE2B9F8ED1"
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "4C9D071F-B28E-46EC-AC61-22B913390211"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}