{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "descriptions": [
            {
               "lang": "en",
               "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nataflop: potential out of bounds in do_format()\n\nThe function uses \"type\" as an array index:\n\n\tq = unit[drive].disk[type]->queue;\n\nUnfortunately the bounds check on \"type\" isn't done until later in the\nfunction.  Fix this by moving the bounds check to the start."
            }
         ],
         "affected": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "drivers/block/ataflop.c"
               ],
               "versions": [
                  {
                     "version": "bf9c0538e485",
                     "lessThan": "07f86aa8f4fe",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bf9c0538e485",
                     "lessThan": "2a3a8bbca28b",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bf9c0538e485",
                     "lessThan": "1ffec389a643",
                     "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/block/ataflop.c"
               ],
               "versions": [
                  {
                     "version": "5.11",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "5.11",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.11.21",
                     "lessThanOrEqual": "5.11.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.12.4",
                     "lessThanOrEqual": "5.12.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.13",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "references": [
            {
               "url": "https://git.kernel.org/stable/c/07f86aa8f4fe077be1b018cc177eb8c6573e5671"
            },
            {
               "url": "https://git.kernel.org/stable/c/2a3a8bbca28b899806844c00d49ed1b7ccb50957"
            },
            {
               "url": "https://git.kernel.org/stable/c/1ffec389a6431782a8a28805830b6fae9bf00af1"
            }
         ],
         "title": "ataflop: potential out of bounds in do_format()",
         "x_generator": {
            "engine": "bippy-a5840b7849dd"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2021-47039",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
