net: mdiobus: fix unbalanced node reference count
In the Linux kernel, the following vulnerability has been resolved: net: mdiobus: fix unbalanced node reference count I got the following report while doing device(mscc-miim) load test with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled: OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /spi/soc@0/mdio@7107009c/ethernet-phy@0 If the 'fwnode' is not an acpi node, the refcount is get in fwnode_mdiobus_phy_device_register(), but it has never been put when the device is freed in the normal path. So call fwnode_handle_put() in phy_device_release() to avoid leak. If it's an acpi node, it has never been get, but it's put in the error path, so call fwnode_handle_get() before phy_device_register() to keep get/put operation balanced.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.15.82, 6.0.12
- CVEs
- CVE-2022-49016
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:17 UTC · Revision 1
Source evidence
net: mdiobus: fix unbalanced node reference count
core-osv · Original sourcePublished 21 Oct 2024, 20:06 UTC
In the Linux kernel, the following vulnerability has been resolved: net: mdiobus: fix unbalanced node reference count I got the following report while doing device(mscc-miim) load test with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled: OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /spi/soc@0/mdio@7107009c/ethernet-phy@0 If the 'fwnode' is not an acpi node, the refcount is get in fwnode_mdiobus_phy_device_register(), but it has never been put when the device is freed in the normal path. So call fwnode_handle_put() in phy_device_release() to avoid leak. If it's an acpi node, it has never been get, but it's put in the error path, so call fwnode_handle_get() before phy_device_register() to keep get/put operation balanced.
osv:CVE-2022-49016
Kernel
Fixed versions: 5.15.82, 6.0.12
Complete source record
{
"id": "bcac87660a1dd1770c665b3b2109c05564c088bf3ee47ab70900a50e0b7a0969",
"url": "https://osv.dev/vulnerability/CVE-2022-49016",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "net: mdiobus: fix unbalanced node reference count",
"summary": "In the Linux kernel, the following vulnerability has been resolved: net: mdiobus: fix unbalanced node reference count I got the following report while doing device(mscc-miim) load test with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled: OF: ERROR: memory leak, expected refcount 1 instead of 2, of_node_get()/of_node_put() unbalanced - destroy cset entry: attach overlay node /spi/soc@0/mdio@7107009c/ethernet-phy@0 If the 'fwnode' is not an acpi node, the refcount is get in fwnode_mdiobus_phy_device_register(), but it has never been put when the device is freed in the normal path. So call fwnode_handle_put() in phy_device_release() to avoid leak. If it's an acpi node, it has never been get, but it's put in the error path, so call fwnode_handle_get() before phy_device_register() to keep get/put operation balanced.",
"evidence": "osv:CVE-2022-49016",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.15.82",
"evidence": "/affected/1/ranges"
},
{
"value": "6.0.12",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-49016",
"aliases": [
"CVE-2022-49016"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "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"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.14.0"
},
{
"fixed": "5.15.82"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.0.12"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49016.json"
}
}
],
"modified": "2026-10-28T02:30:37.403882173Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/2708b357440427d6a9fee667eb7b8307f4625adc",
"https://git.kernel.org/stable/c/543d917f691ab06885ee779c862065899eaa4251",
"https://git.kernel.org/stable/c/cdde1560118f82498fc9e9a7c1ef7f0ef7755891",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49016.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-49016",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49016.json"
}
},
"related_cves": [
{
"value": "CVE-2022-49016",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 504594,
"published_at": "2024-10-21T20:06:25.294+00:00"
}