{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "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": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "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"
               ],
               "versions": [
                  {
                     "version": "a9049e0c513c",
                     "lessThan": "16854177745a",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "a9049e0c513c",
                     "lessThan": "a5c6de1a6656",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "a9049e0c513c",
                     "lessThan": "cb37617687f2",
                     "status": "affected",
                     "versionType": "git"
                  }
               ]
            },
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "affected",
               "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"
               ],
               "versions": [
                  {
                     "version": "4.5",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "4.5",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.15.83",
                     "lessThanOrEqual": "5.15.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.0.13",
                     "lessThanOrEqual": "6.0.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.1",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "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"
            }
         ],
         "title": "net: mdio: fix unbalanced fwnode reference count in mdio_device_release()",
         "x_generator": {
            "engine": "bippy-c9c4e1df01b2"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2022-48961",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
