# CVE-2024-56764: ublk: detach gendisk from ublk device if add_disk() fails

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-01-06T16:20:43.256Z
- Modified: 2026-08-05T11:46:24.574Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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

ublk: detach gendisk from ublk device if add_disk() fails

Inside ublk_abort_requests(), gendisk is grabbed for aborting all
inflight requests. And ublk_abort_requests() is called when exiting
the uring context or handling timeout.

If add_disk() fails, the gendisk may have been freed when calling
ublk_abort_requests(), so use-after-free can be caused when getting
disk's reference in ublk_abort_requests().

Fixes the bug by detaching gendisk from ublk device if add_disk() fails.

(As written by CVE List.)

## Affected

- Linux Linux: from bd23f6c2c2d00518e2f27f2d25cef795de9bee56 before 7d680f2f76a3417fdfc3946da7471e81464f7b41; from bd23f6c2c2d00518e2f27f2d25cef795de9bee56 before 75cd4005da5492129917a4a4ee45e81660556104; 6.7 (not affected: before 6.7; from 6.12.8 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 6.7 before 6.12.8; 6.13

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/7d680f2f76a3417fdfc3946da7471e81464f7b41> (patch)
- <https://git.kernel.org/stable/c/75cd4005da5492129917a4a4ee45e81660556104> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2024-56764 · Whole record: https://cve.day/CVE-2024-56764.json · Rebuilt by cve.day 2026-11-25T22:58:50.725Z
