VYPR
Medium severity5.5NVD Advisory· Published May 6, 2026· Updated May 12, 2026

CVE-2026-43219

CVE-2026-43219

Description

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A bug in the Linux kernel's cpsw_new driver could cause an unregistered network device to be unregistered, leading to a potential use-after-free.

Vulnerability

In the Linux kernel's cpsw_new Ethernet driver, a flaw exists in the error handling path error handling during port registration. When register_netdev() fails for the first MAC in cpsw_register_ports(), the driver sets cpsw->slaves[0].ndev to NULL but leaves cpsw->slaves[1].ndev unchanged. This inconsistency can later cause cpsw_unregister_ports() to attempt to unregister the second MAC's network device, even if it was never successfully registered [1][2][3].

Exploitation

An attacker would need local access to trigger the error condition that causes register_netdev() to fail for the first port. This could occur due to resource exhaustion or hardware misconfiguration. No special privileges beyond the ability to load of the affected driver are required, but the attack surface is limited to systems using the cpsw_new driver with dual Ethernet ports.

Impact

If triggered, the kernel would attempt to call unregister_netdev() on a network device that was never registered, leading to a use-after-free or other memory corruption. This could result in a system crash (denial of service) or potentially allow an attacker to escalate privileges if the memory corruption is exploitable.

Mitigation

The fix adds a check for ndev->reg_state before calling unregister_netdev(), preventing the erroneous unregistration. The patch also removes the now-unnecessary NULL assignment for cpsw->slaves[i].ndev. The fix has been applied to the Linux kernel stable branches [1][2][3]. Users should update to the latest kernel version containing this commit.

AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

3

News mentions

1