In the Linux kernel, the following vulnerability has been resolved: net: cpsw_new: Fix potential unregister of netdev that has not been registered yet If an error occurs during register_netdev() for the first MAC in cpsw_register_ports(), even though cpsw->slaves[0].ndev is set to NULL, cpsw->slaves[1].ndev would remain unchanged. This could later cause cpsw_unregister_ports() to attempt unregistering the second MAC. To address this, add a check for ndev->reg_state before calling unregister_netdev(). With this change, setting cpsw->slaves[i].ndev to NULL becomes unnecessary and can be removed accordingly.
| Product | Vendor | Version |
|---|---|---|
| Linux | Linux | versions prior to 10.1 |
| Linux | Linux | < 11.6 |
| Linux | Linux | unspecified |
| Linux | Linux | >= 1.5.0.0, < 1.7.6.5 |