{"id":"CVE-2022-48961","summary":"net: mdio: fix unbalanced fwnode reference count in mdio_device_release()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: mdio: fix unbalanced fwnode reference count in mdio_device_release()\n\nThere is warning report about of_node refcount leak\nwhile probing mdio device:\n\nOF: ERROR: memory leak, expected refcount 1 instead of 2,\nof_node_get()/of_node_put() unbalanced - destroy cset entry:\nattach overlay node /spi/soc@0/mdio@710700c0/ethernet@4\n\nIn of_mdiobus_register_device(), we increase fwnode refcount\nby fwnode_handle_get() before associating the of_node with\nmdio device, but it has never been decreased in normal path.\nSince that, in mdio_device_release(), it needs to call\nfwnode_handle_put() in addition instead of calling kfree()\ndirectly.\n\nAfter above, just calling mdio_device_free() in the error handle\npath of of_mdiobus_register_device() is enough to keep the\nrefcount balanced.","modified":"2026-04-02T08:27:11.171166Z","published":"2024-10-21T20:05:45.849Z","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/48xxx/CVE-2022-48961.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/16854177745a5648f8ec322353b432e18460f43a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a5c6de1a6656b8cc6bce7cb3d9874dd7df4968c3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cb37617687f2bfa5b675df7779f869147c9002bd"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48961.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-48961"},{"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":"a9049e0c513c4521dbfaa302af8ed08b3366b41f"},{"fixed":"16854177745a5648f8ec322353b432e18460f43a"},{"fixed":"a5c6de1a6656b8cc6bce7cb3d9874dd7df4968c3"},{"fixed":"cb37617687f2bfa5b675df7779f869147c9002bd"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48961.json"}}],"schema_version":"1.7.5"}