UBUNTU-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). 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/[email protected]/ 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.
02 / AFFECTED SOFTWARE
Affected packages
11 explicit affected versions
50 explicit affected versions
6 explicit affected versions
12 explicit affected versions
19 explicit affected versions
6 explicit affected versions
24 explicit affected versions
10 explicit affected versions
28 explicit affected versions
26 explicit affected versions
7 explicit affected versions
32 explicit affected versions
13 explicit affected versions
35 explicit affected versions
35 explicit affected versions
18 explicit affected versions
37 explicit affected versions
13 explicit affected versions
4 explicit affected versions
23 explicit affected versions
43 explicit affected versions
1 explicit affected versions
21 explicit affected versions
9 explicit affected versions
16 explicit affected versions
10 explicit affected versions
39 explicit affected versions
8 explicit affected versions
7 explicit affected versions
12 explicit affected versions
7 explicit affected versions
12 explicit affected versions
14 explicit affected versions
10 explicit affected versions
1 explicit affected versions
7 explicit affected versions
9 explicit affected versions
12 explicit affected versions
12 explicit affected versions
32 explicit affected versions
23 explicit affected versions
25 explicit affected versions
10 explicit affected versions
37 explicit affected versions
10 explicit affected versions
13 explicit affected versions
31 explicit affected versions
10 explicit affected versions
26 explicit affected versions
3 explicit affected versions
13 explicit affected versions
29 explicit affected versions
13 explicit affected versions
32 explicit affected versions
32 explicit affected versions
33 explicit affected versions
23 explicit affected versions
10 explicit affected versions
11 explicit affected versions
10 explicit affected versions
11 explicit affected versions
12 explicit affected versions
7 explicit affected versions
12 explicit affected versions
10 explicit affected versions
26 explicit affected versions
31 explicit affected versions
26 explicit affected versions
38 explicit affected versions
13 explicit affected versions
37 explicit affected versions
16 explicit affected versions
41 explicit affected versions
3 explicit affected versions
7 explicit affected versions
51 explicit affected versions
18 explicit affected versions
33 explicit affected versions
12 explicit affected versions
27 explicit affected versions
34 explicit affected versions
8 explicit affected versions
5 explicit affected versions
3 explicit affected versions
8 explicit affected versions
10 explicit affected versions
7 explicit affected versions
37 explicit affected versions
13 explicit affected versions
13 explicit affected versions
7 explicit affected versions
8 explicit affected versions
10 explicit affected versions
12 explicit affected versions
44 explicit affected versions
16 explicit affected versions
3 explicit affected versions
13 explicit affected versions
26 explicit affected versions
45 explicit affected versions
37 explicit affected versions
42 explicit affected versions
14 explicit affected versions
38 explicit affected versions
9 explicit affected versions
11 explicit affected versions
30 explicit affected versions
13 explicit affected versions
8 explicit affected versions
7 explicit affected versions
4 explicit affected versions
1 explicit affected versions
13 explicit affected versions
43 explicit affected versions
10 explicit affected versions
8 explicit affected versions
36 explicit affected versions
14 explicit affected versions
4 explicit affected versions
78 explicit affected versions
11 explicit affected versions
1 explicit affected versions
10 explicit affected versions
30 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
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/[email protected]/ 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.
05 / REFERENCES
Further evidence
- https://git.kernel.org/linus/7afb5fb42d4950f33af2732b8147c552659f79b7
- 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
- https://ubuntu.com/security/CVE-2025-37864
- https://ubuntu.com/security/notices/USN-7594-1
- https://ubuntu.com/security/notices/USN-7594-2
- https://ubuntu.com/security/notices/USN-7594-3
- https://ubuntu.com/security/notices/USN-8028-1
- https://ubuntu.com/security/notices/USN-8028-2
- https://ubuntu.com/security/notices/USN-8028-3
- https://ubuntu.com/security/notices/USN-8028-4
- https://ubuntu.com/security/notices/USN-8028-5
- https://ubuntu.com/security/notices/USN-8028-6
- https://ubuntu.com/security/notices/USN-8028-7
- https://ubuntu.com/security/notices/USN-8028-8
- https://ubuntu.com/security/notices/USN-8031-1
- https://ubuntu.com/security/notices/USN-8031-2
- https://ubuntu.com/security/notices/USN-8031-3
- https://ubuntu.com/security/notices/USN-8052-1
- https://ubuntu.com/security/notices/USN-8052-2
- https://ubuntu.com/security/notices/USN-8074-1
- https://ubuntu.com/security/notices/USN-8074-2
- https://ubuntu.com/security/notices/USN-8126-1
- https://www.cve.org/CVERecord?id=CVE-2025-37864