CVE-2026-98909: net: cpsw_new: unregister devlink on port registration failure
In the Linux kernel, the following vulnerability has been resolved:
net: cpswnew: unregister devlink on port registration failure
cpswprobe() registers devlink before registering the CPSW ports.
If cpswregisterports() fails, the error path only unregisters the notifiers and then releases the lower level resources. It does not undo the successful cpswregisterdevlink() call, leaving the devlink instance and its parameters registered after probe has failed.
Add a devlink cleanup label for the path where devlink registration has already succeeded, and use it when port registration fails.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In cpsw_probe(), unregister the devlink instance when cpsw_register_ports() fails, using a cleanup label after cpsw_register_devlink() succeeds.