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 put_device() to balance the refcount.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/44xxx/CVE-2024-44971.json",
"cna_assigner": "Linux"
}[
{
"signature_type": "Line",
"target": {
"file": "drivers/net/dsa/bcm_sf2.c"
},
"deprecated": false,
"id": "CVE-2024-44971-1387f7c5",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a7d2808d67570e6acae45c2a96e0d59986888e4c",
"digest": {
"line_hashes": [
"108950212891044723662141741321685994810",
"175416394775944629677420929807391057928",
"7156412285302803394913184726544328789",
"55475542347365615045320054787552151302",
"39699854483916782893076197914329303631"
],
"threshold": 0.9
}
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"function_hash": "5320276795186800414943563453098656651",
"length": 1870.0
},
"id": "CVE-2024-44971-d2e7a752",
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a7d2808d67570e6acae45c2a96e0d59986888e4c",
"target": {
"file": "drivers/net/dsa/bcm_sf2.c",
"function": "bcm_sf2_mdio_register"
}
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-44971.json"