# CVE-2021-47039: ataflop: potential out of bounds in do_format()

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-02-28T08:13:45.937Z
- Modified: 2026-06-17T04:16:16.710Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ataflop: potential out of bounds in do_format()

The function uses "type" as an array index:

	q = unit[drive].disk[type]->queue;

Unfortunately the bounds check on "type" isn't done until later in the
function.  Fix this by moving the bounds check to the start.

(As written by CVE List.)

## Affected

- Linux Linux: from bf9c0538e485b591a2ee02d9adb8a99db4be5a2a before 07f86aa8f4fe077be1b018cc177eb8c6573e5671; from bf9c0538e485b591a2ee02d9adb8a99db4be5a2a before 2a3a8bbca28b899806844c00d49ed1b7ccb50957; from bf9c0538e485b591a2ee02d9adb8a99db4be5a2a before 1ffec389a6431782a8a28805830b6fae9bf00af1; 5.11 (not affected: before 5.11; from 5.11.21 up to 5.11.*; from 5.12.4 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.11 before 5.11.21; from 5.12 before 5.12.4

## References

- <https://git.kernel.org/stable/c/07f86aa8f4fe077be1b018cc177eb8c6573e5671> (patch)
- <https://git.kernel.org/stable/c/2a3a8bbca28b899806844c00d49ed1b7ccb50957> (patch)
- <https://git.kernel.org/stable/c/1ffec389a6431782a8a28805830b6fae9bf00af1> (patch)

## Sources

- CVE List: [CVE-2021-47039](https://www.cve.org/CVERecord?id=CVE-2021-47039), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47039](https://nvd.nist.gov/vuln/detail/CVE-2021-47039), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47039 · Whole record: https://cve.day/CVE-2021-47039.json · Rebuilt by cve.day 2026-11-25T22:58:08.628Z
