{"id":"CVE-2021-47039","state":"PUBLISHED","title":"ataflop: potential out of bounds in do_format()","description":"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.","publishedAt":"2024-02-28T08:13:45.937Z","updatedAt":"2026-05-11T13:46:46.494Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bf9c0538e485b591a2ee02d9adb8a99db4be5a2a","status":"affected","lessThan":"07f86aa8f4fe077be1b018cc177eb8c6573e5671","versionType":"git"},{"version":"bf9c0538e485b591a2ee02d9adb8a99db4be5a2a","status":"affected","lessThan":"2a3a8bbca28b899806844c00d49ed1b7ccb50957","versionType":"git"},{"version":"bf9c0538e485b591a2ee02d9adb8a99db4be5a2a","status":"affected","lessThan":"1ffec389a6431782a8a28805830b6fae9bf00af1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ataflop.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.11.21","status":"unaffected","lessThanOrEqual":"5.11.*","versionType":"semver"},{"version":"5.12.4","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ataflop.c"]}],"references":["https://git.kernel.org/stable/c/07f86aa8f4fe077be1b018cc177eb8c6573e5671","https://git.kernel.org/stable/c/2a3a8bbca28b899806844c00d49ed1b7ccb50957","https://git.kernel.org/stable/c/1ffec389a6431782a8a28805830b6fae9bf00af1"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47039.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47039","state":"PUBLISHED","datePublished":"2024-02-28T08:13:45.937Z","dateUpdated":"2026-05-11T13:46:46.494Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-27T18:42:55.968Z"},"containers":{"cna":{"title":"ataflop: potential out of bounds in do_format()","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":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bf9c0538e485b591a2ee02d9adb8a99db4be5a2a","status":"affected","lessThan":"07f86aa8f4fe077be1b018cc177eb8c6573e5671","versionType":"git"},{"version":"bf9c0538e485b591a2ee02d9adb8a99db4be5a2a","status":"affected","lessThan":"2a3a8bbca28b899806844c00d49ed1b7ccb50957","versionType":"git"},{"version":"bf9c0538e485b591a2ee02d9adb8a99db4be5a2a","status":"affected","lessThan":"1ffec389a6431782a8a28805830b6fae9bf00af1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ataflop.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.11.21","status":"unaffected","lessThanOrEqual":"5.11.*","versionType":"semver"},{"version":"5.12.4","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ataflop.c"]}],"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"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T13:46:46.494Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.11.21"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.12.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2021-47039","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-02-28T19:19:31.846169Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:14:17.074Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/07f86aa8f4fe077be1b018cc177eb8c6573e5671","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/2a3a8bbca28b899806844c00d49ed1b7ccb50957","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1ffec389a6431782a8a28805830b6fae9bf00af1","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:24:39.421Z"}}]}}}