Skip to main content

CVE-2024-56764: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-56764cvecve-2024-56764
Published: Mon Jan 06 2025 (01/06/2025, 16:20:43 UTC)
Source: CVE
Vendor/Project: Linux
Product: 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.

AI-Powered Analysis

AILast updated: 07/02/2025, 22:26:08 UTC

Technical Analysis

CVE-2024-56764 is a high-severity use-after-free vulnerability in the Linux kernel's ublk (user block) driver subsystem. The vulnerability arises from improper handling of the gendisk structure during the addition of a disk device. Specifically, when the add_disk() function fails, the gendisk pointer may have already been freed, but the ublk_abort_requests() function still attempts to access it to abort all inflight requests. This results in a use-after-free condition (CWE-416), which can lead to memory corruption. The vulnerability occurs because ublk_abort_requests() is called either when exiting the io_uring context or when handling a timeout, and it assumes the gendisk reference is valid. The fix involves detaching the gendisk from the ublk device if add_disk() fails, preventing the use-after-free scenario. The vulnerability has a CVSS 3.1 score of 7.8, indicating high severity, with attack vector local (AV:L), low attack complexity (AC:L), requiring low privileges (PR:L), no user interaction (UI:N), unchanged scope (S:U), and high impact on confidentiality, integrity, and availability (C:H/I:H/A:H). No known exploits are currently reported in the wild. This vulnerability affects Linux kernel versions identified by the commit hash bd23f6c2c2d00518e2f27f2d25cef795de9bee56 and likely related versions around that commit. Because the Linux kernel is widely used in servers, desktops, and embedded devices, this vulnerability could be exploited by local attackers with some privileges to cause system crashes, escalate privileges, or execute arbitrary code, potentially compromising system confidentiality, integrity, and availability.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially for those relying on Linux-based infrastructure such as servers, cloud environments, and embedded systems. Exploitation could allow attackers with local access to crash critical systems or execute arbitrary code with elevated privileges, leading to data breaches, service disruptions, or lateral movement within networks. Sectors such as finance, healthcare, telecommunications, and government agencies, which often use Linux servers for critical workloads, could face operational downtime and data integrity issues. The high impact on confidentiality, integrity, and availability means sensitive data could be exposed or manipulated, and critical services could be interrupted. Additionally, the vulnerability's presence in the io_uring subsystem, which is increasingly used for high-performance asynchronous I/O operations, means that high-throughput systems could be particularly vulnerable to exploitation attempts causing denial of service or privilege escalation.

Mitigation Recommendations

European organizations should promptly apply the official Linux kernel patches that address CVE-2024-56764 once available. Until patches are deployed, organizations should limit local access to systems running vulnerable Linux kernel versions by enforcing strict access controls and monitoring for suspicious local activity. Employ kernel-level security modules such as SELinux or AppArmor to restrict the capabilities of processes interacting with the ublk subsystem. Regularly audit and update Linux kernel versions to ensure all security fixes are applied timely. For environments using io_uring heavily, consider temporarily disabling or restricting its usage if feasible. Implement comprehensive logging and alerting to detect anomalous behavior related to disk operations or kernel crashes. Additionally, conduct vulnerability scanning and penetration testing focused on local privilege escalation vectors to identify potential exploitation attempts. Finally, maintain robust incident response plans to quickly contain and remediate any exploitation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T11:26:39.762Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9822c4522896dcbde76f

Added to database: 5/21/2025, 9:08:50 AM

Last enriched: 7/2/2025, 10:26:08 PM

Last updated: 7/28/2025, 7:30:18 AM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats