CVE-2024-56764·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.12.8
- Published
- 2025-01-06
Affected versions
From: 6.7
Until: 6.12.8
Fixed in: 6.12.8
How to fix this CVE
Update your Linux kernel to version 6.12.8 or later to resolve a use-after-free vulnerability in the ublk (userspace block device) subsystem. The vulnerability occurs when gendisk initialization fails, leaving freed memory references that can be accessed during request abort operations. Systems running kernel versions 6.7 through 6.12.7 should prioritize this update, particularly those using ublk for block device operations.
sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check kernel version with `uname -r` and compare against the affected range (6.7 to 6.12.7)
- Step 2: Verify ublk is enabled in kernel config: `cat /boot/config-$(uname -r) | grep CONFIG_BLK_DEV_UBLK`
- Step 3: Search kernel logs for use-after-free crashes: `sudo dmesg | grep -i 'use-after-free\|ublk\|gendisk'`
- Step 4: After patching, confirm new kernel version with `uname -r` shows 6.12.8 or later, then reboot if needed
FAQ
What is CVE-2024-56764?
CVE-2024-56764 is a use-after-free vulnerability in the Linux kernel's ublk (userspace block device) driver. When disk initialization fails, the gendisk structure is freed but still referenced during request abort operations, potentially causing memory corruption or kernel panic.
Is CVE-2024-56764 being actively exploited?
No, CVE-2024-56764 is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, it poses a significant denial-of-service risk for systems using ublk.
What versions of Kernel are affected by CVE-2024-56764?
Linux kernel versions 6.7 through 6.12.7 are affected. The vulnerability has been patched in kernel 6.12.8 and later.
How do I check if my server is vulnerable to CVE-2024-56764?
Run `uname -r` to check your kernel version. If it reports a version between 6.7 and 6.12.7, your system is vulnerable. Also verify ublk is enabled with `cat /boot/config-$(uname -r) | grep CONFIG_BLK_DEV_UBLK`.
Does Defensia detect CVE-2024-56764?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-56764 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-56764. Free for 1 server.
Get started free