CVE-2024-44971: net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: bcmsf2: Fix a possible memory leak in bcmsf2mdioregister()
bcmsf2mdioregister() calls ofphyfinddevice() and then phydeviceremove() in a loop to remove existing PHY devices. ofphyfinddevice() eventually calls busfinddevice(), which calls getdevice() on the returned struct device to increment the refcount. The current implementation does not decrement the refcount, which causes memory leak.
This commit adds the missing phydevicefree() call to decrement the refcount via putdevice() to balance the refcount.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-44971?
CVE-2024-44971 is classified as a moderate severity vulnerability in the Linux kernel.
What versions of the Linux kernel are affected by CVE-2024-44971?
CVE-2024-44971 affects various versions of the Linux kernel from 5.10 to 6.11-rc2.
How do I fix CVE-2024-44971?
To fix CVE-2024-44971, upgrade to the patched versions of the Linux kernel such as 5.10.226-1, 6.1.123-1, or higher.
What type of vulnerability is CVE-2024-44971?
CVE-2024-44971 is a vulnerability related to a possible memory leak in the bcm_sf2_mdio_register function.
Is there a workaround for CVE-2024-44971?
There are no widely recommended workarounds for CVE-2024-44971; applying the update is the best approach.