Skip to content
Heist/ feed
Back to feed
UnratedFix available

net: mdio: fix unbalanced fwnode reference count in mdio_device_release()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: net: mdio: fix unbalanced fwnode reference count in mdio_device_release() There is warning report about of_node refcount leak while probing mdio device: 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@710700c0/ethernet@4 In of_mdiobus_register_device(), we increase fwnode refcount by fwnode_handle_get() before associating the of_node with mdio device, but it has never been decreased in normal path. Since that, in mdio_device_release(), it needs to call fwnode_handle_put() in addition instead of calling kfree() directly. After above, just calling mdio_device_free() in the error handle path of of_mdiobus_register_device() is enough to keep the refcount balanced.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.83, 6.0.13
CVEs
CVE-2022-48961
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 11:37 UTC · Revision 1

Source evidence

net: mdio: fix unbalanced fwnode reference count in mdio_device_release()

core-osv · Original source

Published 21 Oct 2024, 20:05 UTC

In the Linux kernel, the following vulnerability has been resolved: net: mdio: fix unbalanced fwnode reference count in mdio_device_release() There is warning report about of_node refcount leak while probing mdio device: 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@710700c0/ethernet@4 In of_mdiobus_register_device(), we increase fwnode refcount by fwnode_handle_get() before associating the of_node with mdio device, but it has never been decreased in normal path. Since that, in mdio_device_release(), it needs to call fwnode_handle_put() in addition instead of calling kfree() directly. After above, just calling mdio_device_free() in the error handle path of of_mdiobus_register_device() is enough to keep the refcount balanced.

osv:CVE-2022-48961

Kernel

Fixed versions: 5.15.83, 6.0.13

Complete source record
{
  "id": "ab48be222dd063b760f53361ee796fd1be051d62c60371464f21d2afbb6d62e8",
  "url": "https://osv.dev/vulnerability/CVE-2022-48961",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "net: mdio: fix unbalanced fwnode reference count in mdio_device_release()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: net: mdio: fix unbalanced fwnode reference count in mdio_device_release() There is warning report about of_node refcount leak while probing mdio device: 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@710700c0/ethernet@4 In of_mdiobus_register_device(), we increase fwnode refcount by fwnode_handle_get() before associating the of_node with mdio device, but it has never been decreased in normal path. Since that, in mdio_device_release(), it needs to call fwnode_handle_put() in addition instead of calling kfree() directly. After above, just calling mdio_device_free() in the error handle path of of_mdiobus_register_device() is enough to keep the refcount balanced.",
    "evidence": "osv:CVE-2022-48961",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.83",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.0.13",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-48961",
      "aliases": [
        "CVE-2022-48961"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "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"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.5.0"
                },
                {
                  "fixed": "5.15.83"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.0.13"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48961.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.943758643Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/16854177745a5648f8ec322353b432e18460f43a",
        "https://git.kernel.org/stable/c/a5c6de1a6656b8cc6bce7cb3d9874dd7df4968c3",
        "https://git.kernel.org/stable/c/cb37617687f2bfa5b675df7779f869147c9002bd",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48961.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-48961",
        "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/48xxx/CVE-2022-48961.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-48961",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 519153,
  "published_at": "2024-10-21T20:05:45.849+00:00"
}