{
   "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: 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": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "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"
               ],
               "versions": [
                  {
                     "version": "bc1bee3b87ee",
                     "lessThan": "543d917f691a",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bc1bee3b87ee",
                     "lessThan": "2708b3574404",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bc1bee3b87ee",
                     "lessThan": "cdde1560118f",
                     "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/fwnode_mdio.c",
                  "drivers/net/phy/phy_device.c"
               ],
               "versions": [
                  {
                     "version": "5.14",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "5.14",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.15.82",
                     "lessThanOrEqual": "5.15.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.0.12",
                     "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/543d917f691ab06885ee779c862065899eaa4251"
            },
            {
               "url": "https://git.kernel.org/stable/c/2708b357440427d6a9fee667eb7b8307f4625adc"
            },
            {
               "url": "https://git.kernel.org/stable/c/cdde1560118f82498fc9e9a7c1ef7f0ef7755891"
            }
         ],
         "title": "net: mdiobus: fix unbalanced node reference count",
         "x_generator": {
            "engine": "bippy-c9c4e1df01b2"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2022-49016",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
