{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "descriptions": [
            {
               "lang": "en",
               "value": "memstick: fix memory leak if card device is never registered\n\nWhen calling dev_set_name() memory is allocated for the name for the\nstruct device.  Once that structure device is registered, or attempted\nto be registerd, with the driver core, the driver core will handle\ncleaning up that memory when the device is removed from the system.\n\nUnfortunatly for the memstick code, there is an error path that causes\nthe struct device to never be registered, and so the memory allocated in\ndev_set_name will be leaked.  Fix that leak by manually freeing it right\nbefore the memory for the device is freed."
            }
         ],
         "affected": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "versions": [
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "052d22bf5453",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "70ae89da72f3",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "1b8b54fc55a4",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "e10a6d88ae9b",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "ebab1a86ca3e",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "a3a93b46833f",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "d299776014ba",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "0252c3b4f018",
                     "lessThan": "4b6d621c9d85",
                     "status": "affected",
                     "versionType": "git"
                  }
               ]
            },
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "affected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "versions": [
                  {
                     "version": "2.6.29",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "2.6.29",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "4.14.314",
                     "lessThanOrEqual": "4.14.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "4.19.282",
                     "lessThanOrEqual": "4.19.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.4.242",
                     "lessThanOrEqual": "5.4.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.10.179",
                     "lessThanOrEqual": "5.10.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.15.109",
                     "lessThanOrEqual": "5.15.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.1.26",
                     "lessThanOrEqual": "6.1.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.2.13",
                     "lessThanOrEqual": "6.2.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.3",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "references": [
            {
               "url": "https://git.kernel.org/stable/c/052d22bf5453"
            },
            {
               "url": "https://git.kernel.org/stable/c/70ae89da72f3"
            },
            {
               "url": "https://git.kernel.org/stable/c/1b8b54fc55a4"
            },
            {
               "url": "https://git.kernel.org/stable/c/e10a6d88ae9b"
            },
            {
               "url": "https://git.kernel.org/stable/c/ebab1a86ca3e"
            },
            {
               "url": "https://git.kernel.org/stable/c/a3a93b46833f"
            },
            {
               "url": "https://git.kernel.org/stable/c/d299776014ba"
            },
            {
               "url": "https://git.kernel.org/stable/c/4b6d621c9d85"
            }
         ],
         "title": "memstick: fix memory leak if card device is never registered",
         "x_generator": {
            "engine": "bippy-c4875b56942e"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2023-21658",
      "requesterUserId": "gregkh@linuxfoundation.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
