Skip to main content

CVE-2024-50079: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-50079cvecve-2024-50079
Published: Tue Oct 29 2024 (10/29/2024, 00:50:21 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: io_uring/sqpoll: ensure task state is TASK_RUNNING when running task_work When the sqpoll is exiting and cancels pending work items, it may need to run task_work. If this happens from within io_uring_cancel_generic(), then it may be under waiting for the io_uring_task waitqueue. This results in the below splat from the scheduler, as the ring mutex may be attempted grabbed while in a TASK_INTERRUPTIBLE state. Ensure that the task state is set appropriately for that, just like what is done for the other cases in io_run_task_work(). do not call blocking ops when !TASK_RUNNING; state=1 set at [<0000000029387fd2>] prepare_to_wait+0x88/0x2fc WARNING: CPU: 6 PID: 59939 at kernel/sched/core.c:8561 __might_sleep+0xf4/0x140 Modules linked in: CPU: 6 UID: 0 PID: 59939 Comm: iou-sqp-59938 Not tainted 6.12.0-rc3-00113-g8d020023b155 #7456 Hardware name: linux,dummy-virt (DT) pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : __might_sleep+0xf4/0x140 lr : __might_sleep+0xf4/0x140 sp : ffff80008c5e7830 x29: ffff80008c5e7830 x28: ffff0000d93088c0 x27: ffff60001c2d7230 x26: dfff800000000000 x25: ffff0000e16b9180 x24: ffff80008c5e7a50 x23: 1ffff000118bcf4a x22: ffff0000e16b9180 x21: ffff0000e16b9180 x20: 000000000000011b x19: ffff80008310fac0 x18: 1ffff000118bcd90 x17: 30303c5b20746120 x16: 74657320313d6574 x15: 0720072007200720 x14: 0720072007200720 x13: 0720072007200720 x12: ffff600036c64f0b x11: 1fffe00036c64f0a x10: ffff600036c64f0a x9 : dfff800000000000 x8 : 00009fffc939b0f6 x7 : ffff0001b6327853 x6 : 0000000000000001 x5 : ffff0001b6327850 x4 : ffff600036c64f0b x3 : ffff8000803c35bc x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0000e16b9180 Call trace: __might_sleep+0xf4/0x140 mutex_lock+0x84/0x124 io_handle_tw_list+0xf4/0x260 tctx_task_work_run+0x94/0x340 io_run_task_work+0x1ec/0x3c0 io_uring_cancel_generic+0x364/0x524 io_sq_thread+0x820/0x124c ret_from_fork+0x10/0x20

AI-Powered Analysis

AILast updated: 06/28/2025, 16:57:23 UTC

Technical Analysis

CVE-2024-50079 is a vulnerability identified in the Linux kernel's io_uring subsystem, specifically related to the sqpoll (submission queue polling) feature. The issue arises when the sqpoll thread is exiting and attempts to cancel pending work items, which may require running task_work functions. If this cancellation occurs within the io_uring_cancel_generic() function, the thread might be waiting on the io_uring_task waitqueue. This situation leads to a problematic state where the kernel scheduler's mutex lock is attempted while the task is in a TASK_INTERRUPTIBLE state rather than the required TASK_RUNNING state. The kernel expects that blocking operations should only be performed when the task state is TASK_RUNNING to avoid deadlocks or kernel panics. The vulnerability manifests as a kernel warning and potential crash (splat) due to improper task state management during mutex locking in the scheduler. The detailed kernel stack trace shows the failure occurs in __might_sleep(), which is a kernel debugging helper that warns if a blocking operation is attempted in an invalid context. This flaw can cause system instability or denial of service by crashing the kernel or causing unpredictable behavior in systems using io_uring with sqpoll enabled. The vulnerability affects Linux kernel versions around 6.12.0-rc3 and potentially others using the affected commit hashes. No known exploits are reported in the wild yet, and no CVSS score has been assigned. The root cause is a missing state transition to TASK_RUNNING before running task_work during cancellation, which has been addressed by ensuring the task state is set correctly, mirroring the handling in other io_uring task_work execution paths.

Potential Impact

For European organizations relying on Linux servers, especially those using io_uring with sqpoll enabled for high-performance asynchronous I/O operations, this vulnerability poses a risk of kernel crashes leading to denial of service. This can affect critical infrastructure, cloud services, and enterprise environments where Linux is prevalent. The impact is primarily on system availability and stability, potentially causing service interruptions. While no direct remote code execution or privilege escalation is indicated, the kernel panic could be triggered by local processes or workloads that interact with io_uring's sqpoll feature, which might be exploited by malicious insiders or compromised applications. Organizations running containerized workloads, cloud platforms, or high-performance computing clusters on Linux kernels in the affected versions could experience outages or degraded performance. Given the kernel-level nature of the flaw, recovery may require system reboots and patching, impacting operational continuity. The lack of known exploits reduces immediate risk, but the vulnerability should be addressed promptly to prevent potential exploitation or accidental crashes.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions where this vulnerability is patched. Since the issue is related to kernel task state management in io_uring sqpoll, applying the official Linux kernel patches or upgrading to a stable kernel release post-6.12.0-rc3 that includes the fix is essential. For environments where immediate kernel upgrades are challenging, disabling the sqpoll feature in io_uring can mitigate the risk, as the vulnerability is specific to the sqpoll exit path. System administrators should audit their use of io_uring and sqpoll, especially in performance-critical applications, and consider fallback mechanisms or alternative asynchronous I/O methods until patched. Monitoring kernel logs for __might_sleep warnings or related kernel panics can help detect attempts to trigger the issue. Additionally, restricting untrusted local users' ability to invoke io_uring operations or limiting access to vulnerable kernel features can reduce exploitation likelihood. Incorporating kernel live patching solutions where available may also provide a rapid mitigation path without full system reboots.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-10-21T19:36:19.941Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9824c4522896dcbdfe98

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

Last enriched: 6/28/2025, 4:57:23 PM

Last updated: 7/25/2025, 5:23:50 AM

Views: 6

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