{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "descriptions": [
            {
               "lang": "en",
               "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nof: Fix double free in of_parse_phandle_with_args_map\n\nIn of_parse_phandle_with_args_map() the inner loop that\niterates through the map entries calls of_node_put(new)\nto free the reference acquired by the previous iteration\nof the inner loop. This assumes that the value of \"new\" is\nNULL on the first iteration of the inner loop.\n\nMake sure that this is true in all iterations of the outer\nloop by setting \"new\" to NULL after its value is assigned to \"cur\".\n\nExtend the unittest to detect the double free and add an additional\ntest case that actually triggers this path."
            }
         ],
         "affected": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "drivers/of/base.c",
                  "drivers/of/unittest-data/tests-phandle.dtsi",
                  "drivers/of/unittest.c"
               ],
               "versions": [
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "26b4d702c44f",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "a0a061151a62",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "d5f490343c77",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "454100408452",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "b9d760dae5b1",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "b64d09a4e859",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "cafa99213412",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bd6f2fd5a1d5",
                     "lessThan": "4dde83569832",
                     "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/of/base.c",
                  "drivers/of/unittest-data/tests-phandle.dtsi",
                  "drivers/of/unittest.c"
               ],
               "versions": [
                  {
                     "version": "4.17",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "4.17",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "4.19.306",
                     "lessThanOrEqual": "4.19.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.4.268",
                     "lessThanOrEqual": "5.4.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.10.209",
                     "lessThanOrEqual": "5.10.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.15.148",
                     "lessThanOrEqual": "5.15.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.1.75",
                     "lessThanOrEqual": "6.1.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.6.14",
                     "lessThanOrEqual": "6.6.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.7.2",
                     "lessThanOrEqual": "6.7.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.8",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "references": [
            {
               "url": "https://git.kernel.org/stable/c/26b4d702c44f9e5cf3c5c001ae619a4a001889db"
            },
            {
               "url": "https://git.kernel.org/stable/c/a0a061151a6200c13149dbcdb6c065203c8425d2"
            },
            {
               "url": "https://git.kernel.org/stable/c/d5f490343c77e6708b6c4aa7dbbfbcbb9546adea"
            },
            {
               "url": "https://git.kernel.org/stable/c/4541004084527ce9e95a818ebbc4e6b293ffca21"
            },
            {
               "url": "https://git.kernel.org/stable/c/b9d760dae5b10e73369b769073525acd7b3be2bd"
            },
            {
               "url": "https://git.kernel.org/stable/c/b64d09a4e8596f76d27f4b4a90a1cf6baf6a82f8"
            },
            {
               "url": "https://git.kernel.org/stable/c/cafa992134124e785609a406da4ff2b54052aff7"
            },
            {
               "url": "https://git.kernel.org/stable/c/4dde83569832f9377362e50f7748463340c5db6b"
            }
         ],
         "title": "of: Fix double free in of_parse_phandle_with_args_map",
         "x_generator": {
            "engine": "bippy-a5840b7849dd"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2023-52679",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
