{"id":"CVE-2022-48961","state":"PUBLISHED","title":"net: mdio: fix unbalanced fwnode reference count in mdio_device_release()","description":"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.","publishedAt":"2024-10-21T20:05:45.849Z","updatedAt":"2026-05-11T18:50:30.629Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a9049e0c513c4521dbfaa302af8ed08b3366b41f","status":"affected","lessThan":"16854177745a5648f8ec322353b432e18460f43a","versionType":"git"},{"version":"a9049e0c513c4521dbfaa302af8ed08b3366b41f","status":"affected","lessThan":"a5c6de1a6656b8cc6bce7cb3d9874dd7df4968c3","versionType":"git"},{"version":"a9049e0c513c4521dbfaa302af8ed08b3366b41f","status":"affected","lessThan":"cb37617687f2bfa5b675df7779f869147c9002bd","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/mdio/of_mdio.c","drivers/net/phy/mdio_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.5","versionType":"semver"},{"version":"5.15.83","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.13","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/mdio/of_mdio.c","drivers/net/phy/mdio_device.c"]}],"references":["https://git.kernel.org/stable/c/16854177745a5648f8ec322353b432e18460f43a","https://git.kernel.org/stable/c/a5c6de1a6656b8cc6bce7cb3d9874dd7df4968c3","https://git.kernel.org/stable/c/cb37617687f2bfa5b675df7779f869147c9002bd"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/48xxx/CVE-2022-48961.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-48961","state":"PUBLISHED","datePublished":"2024-10-21T20:05:45.849Z","dateUpdated":"2026-05-11T18:50:30.629Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-08-22T01:27:53.628Z"},"containers":{"cna":{"title":"net: mdio: fix unbalanced fwnode reference count in mdio_device_release()","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a9049e0c513c4521dbfaa302af8ed08b3366b41f","status":"affected","lessThan":"16854177745a5648f8ec322353b432e18460f43a","versionType":"git"},{"version":"a9049e0c513c4521dbfaa302af8ed08b3366b41f","status":"affected","lessThan":"a5c6de1a6656b8cc6bce7cb3d9874dd7df4968c3","versionType":"git"},{"version":"a9049e0c513c4521dbfaa302af8ed08b3366b41f","status":"affected","lessThan":"cb37617687f2bfa5b675df7779f869147c9002bd","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/mdio/of_mdio.c","drivers/net/phy/mdio_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.5","versionType":"semver"},{"version":"5.15.83","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.13","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/mdio/of_mdio.c","drivers/net/phy/mdio_device.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/16854177745a5648f8ec322353b432e18460f43a"},{"url":"https://git.kernel.org/stable/c/a5c6de1a6656b8cc6bce7cb3d9874dd7df4968c3"},{"url":"https://git.kernel.org/stable/c/cb37617687f2bfa5b675df7779f869147c9002bd"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:50:30.629Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.5","versionEndExcluding":"5.15.83"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.5","versionEndExcluding":"6.0.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.5","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-48961","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-22T13:20:22.871299Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-22T13:28:39.139Z"}}]}}}