{"id":"CVE-2022-49016","summary":"net: mdiobus: fix unbalanced node reference count","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: mdiobus: fix unbalanced node reference count\n\nI got the following report while doing device(mscc-miim) load test\nwith CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled:\n\n  OF: ERROR: memory leak, expected refcount 1 instead of 2,\n  of_node_get()/of_node_put() unbalanced - destroy cset entry:\n  attach overlay node /spi/soc@0/mdio@7107009c/ethernet-phy@0\n\nIf the 'fwnode' is not an acpi node, the refcount is get in\nfwnode_mdiobus_phy_device_register(), but it has never been\nput when the device is freed in the normal path. So call\nfwnode_handle_put() in phy_device_release() to avoid leak.\n\nIf it's an acpi node, it has never been get, but it's put\nin the error path, so call fwnode_handle_get() before\nphy_device_register() to keep get/put operation balanced.","modified":"2026-04-02T08:27:13.739980Z","published":"2024-10-21T20:06:25.294Z","related":["SUSE-SU-2024:3983-1","SUSE-SU-2024:3985-1","SUSE-SU-2024:4082-1","SUSE-SU-2024:4131-1","SUSE-SU-2024:4364-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49016.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2708b357440427d6a9fee667eb7b8307f4625adc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/543d917f691ab06885ee779c862065899eaa4251"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cdde1560118f82498fc9e9a7c1ef7f0ef7755891"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49016.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49016"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"bc1bee3b87ee48bd97ef7fd306445132ba2041b0"},{"fixed":"543d917f691ab06885ee779c862065899eaa4251"},{"fixed":"2708b357440427d6a9fee667eb7b8307f4625adc"},{"fixed":"cdde1560118f82498fc9e9a7c1ef7f0ef7755891"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49016.json"}}],"schema_version":"1.7.5"}