{"id":"CVE-2022-49016","state":"PUBLISHED","title":"net: mdiobus: fix unbalanced node reference count","description":"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.","publishedAt":"2024-10-21T20:06:25.294Z","updatedAt":"2026-05-11T18:51:34.730Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bc1bee3b87ee48bd97ef7fd306445132ba2041b0","status":"affected","lessThan":"543d917f691ab06885ee779c862065899eaa4251","versionType":"git"},{"version":"bc1bee3b87ee48bd97ef7fd306445132ba2041b0","status":"affected","lessThan":"2708b357440427d6a9fee667eb7b8307f4625adc","versionType":"git"},{"version":"bc1bee3b87ee48bd97ef7fd306445132ba2041b0","status":"affected","lessThan":"cdde1560118f82498fc9e9a7c1ef7f0ef7755891","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/mdio/fwnode_mdio.c","drivers/net/phy/phy_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.82","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.12","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/fwnode_mdio.c","drivers/net/phy/phy_device.c"]}],"references":["https://git.kernel.org/stable/c/543d917f691ab06885ee779c862065899eaa4251","https://git.kernel.org/stable/c/2708b357440427d6a9fee667eb7b8307f4625adc","https://git.kernel.org/stable/c/cdde1560118f82498fc9e9a7c1ef7f0ef7755891"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49016.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49016","state":"PUBLISHED","datePublished":"2024-10-21T20:06:25.294Z","dateUpdated":"2026-05-11T18:51:34.730Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-08-22T01:27:53.645Z"},"containers":{"cna":{"title":"net: mdiobus: fix unbalanced node reference count","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bc1bee3b87ee48bd97ef7fd306445132ba2041b0","status":"affected","lessThan":"543d917f691ab06885ee779c862065899eaa4251","versionType":"git"},{"version":"bc1bee3b87ee48bd97ef7fd306445132ba2041b0","status":"affected","lessThan":"2708b357440427d6a9fee667eb7b8307f4625adc","versionType":"git"},{"version":"bc1bee3b87ee48bd97ef7fd306445132ba2041b0","status":"affected","lessThan":"cdde1560118f82498fc9e9a7c1ef7f0ef7755891","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/mdio/fwnode_mdio.c","drivers/net/phy/phy_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.82","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.12","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/fwnode_mdio.c","drivers/net/phy/phy_device.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/543d917f691ab06885ee779c862065899eaa4251"},{"url":"https://git.kernel.org/stable/c/2708b357440427d6a9fee667eb7b8307f4625adc"},{"url":"https://git.kernel.org/stable/c/cdde1560118f82498fc9e9a7c1ef7f0ef7755891"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:51:34.730Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.15.82"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.0.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-49016","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-22T13:13:13.450914Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-22T13:18:37.857Z"}}]}}}