# CVE-2024-44971: net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-02)
- Published: 2024-09-04T18:56:47.475Z
- Modified: 2026-06-17T07:53:20.040Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()

bcm_sf2_mdio_register() calls of_phy_find_device() and then
phy_device_remove() in a loop to remove existing PHY devices.
of_phy_find_device() eventually calls bus_find_device(), which calls
get_device() 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 phy_device_free() call to decrement the
refcount via put_device() to balance the refcount.

(As written by CVE List.)

## Affected

- Linux Linux: from 771089c2a485958e423f305e974303760167b45c before b7b8d9f5e679af60c94251fd6728dde34be69a71; from 771089c2a485958e423f305e974303760167b45c before c05516c072903f6fb9134b8e7e1ad4bffcdc4819; from 771089c2a485958e423f305e974303760167b45c before 7feef10768ea71d468d9bbc1e0d14c461876768c; from 771089c2a485958e423f305e974303760167b45c before a7d2808d67570e6acae45c2a96e0d59986888e4c; from 771089c2a485958e423f305e974303760167b45c before f3d5efe18a11f94150fee8b3fda9d62079af640a; from 771089c2a485958e423f305e974303760167b45c before e3862093ee93fcfbdadcb7957f5f8974fffa806a; 5.10 (not affected: before 5.10; from 5.10.224 up to 5.10.*; from 5.15.165 up to 5.15.*; from 6.1.105 up to 6.1.*; from 6.6.46 up to 6.6.*; from 6.10.5 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: from 5.10 before 5.10.224; from 5.11 before 5.15.165; from 5.16 before 6.1.105; from 6.2 before 6.6.46; from 6.7 before 6.10.5; 6.11

## References

- <https://git.kernel.org/stable/c/b7b8d9f5e679af60c94251fd6728dde34be69a71> (patch)
- <https://git.kernel.org/stable/c/c05516c072903f6fb9134b8e7e1ad4bffcdc4819> (patch)
- <https://git.kernel.org/stable/c/7feef10768ea71d468d9bbc1e0d14c461876768c> (patch)
- <https://git.kernel.org/stable/c/a7d2808d67570e6acae45c2a96e0d59986888e4c> (patch)
- <https://git.kernel.org/stable/c/f3d5efe18a11f94150fee8b3fda9d62079af640a> (patch)
- <https://git.kernel.org/stable/c/e3862093ee93fcfbdadcb7957f5f8974fffa806a> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>

## Sources

- CVE List: [CVE-2024-44971](https://www.cve.org/CVERecord?id=CVE-2024-44971), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-44971](https://nvd.nist.gov/vuln/detail/CVE-2024-44971), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-44971 · Whole record: https://cve.day/CVE-2024-44971.json · Rebuilt by cve.day 2026-11-25T22:58:45.081Z
