CVE-2024-50274 idpf: avoid vport access in idpf_get_link_ksettings
A use-after-free in the idpf driver causes a kernel crash when monitoring tools access link settings during a failed device reset.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-50274?
CVE-2024-50274 is a high-severity use after free vulnerability in Linux kernel, published on 19 Nov 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
idpf: avoid vport access in idpf_get_link_ksettings
When the device control plane is removed or the platform running device control plane is rebooted, a reset is detected on the driver. On driver reset, it releases the resources and waits for the reset to complete. If the reset fails, it takes the error path and releases the vport lock. At this time if the monitoring tools tries to access link settings, it call traces for accessing released vport pointer.
To avoid it, move link_speed_mbps to netdev_priv structure which removes the dependency on vport pointer and the vport lock in idpf_get_link_ksettings. Also use netif_carrier_ok() to check the link status and adjust the offsetof to use link_up instead of link_speed_mbps.
Weakness: CWE-416
Which versions are affected by CVE-2024-50274?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-50274?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-50274 being exploited?
There is no known exploitation of CVE-2024-50274 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-50274, DEBIAN-CVE-2024-50274, GHSA-xjmh-6wp6-74q8, UBUNTU-CVE-2024-50274.