Linux Kernel CPSW Driver Net Device Unregistration Vulnerability

Vulnerability

A vulnerability in the Linux kernel's CPSW (Ethernet) driver could lead to an improper unregistration of a network device that has not been successfully registered. This issue arises in the 'cpsw_register_ports()' function, where an error during the registration process for the first MAC can leave the second MAC's network device pointer unchanged. Consequently, the 'cpsw_unregister_ports()' function may attempt to unregister a device that was never properly registered. The vulnerability affects the Linux kernel stable tree.

Impact

The vulnerability could cause the system to attempt to unregister a network device that was not registered, potentially leading to unexpected behavior or errors in network management.

Reproduction

The vulnerability can be reproduced by simulating an error during the 'register_netdev()' call for the first MAC in the 'cpsw_register_ports()' function. This will cause the second MAC's network device pointer to remain unchanged, setting the stage for 'cpsw_unregister_ports()' to incorrectly attempt to unregister it.

Remediation

The vulnerability has been addressed by adding a check for the network device's registration state before calling the unregistration function. This modification ensures that only properly registered devices are unregistered, preventing the issue from occurring.

Added: May 6, 2026, 1:54 PM
Updated: May 6, 2026, 1:54 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
0.6
exploitability
4.3
remediation
7.7
relevance
7.6
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.