Skip to main content

CVE-2024-57891: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-57891cvecve-2024-57891
Published: Wed Jan 15 2025 (01/15/2025, 13:05:43 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: sched_ext: Fix invalid irq restore in scx_ops_bypass() While adding outer irqsave/restore locking, 0e7ffff1b811 ("scx: Fix raciness in scx_ops_bypass()") forgot to convert an inner rq_unlock_irqrestore() to rq_unlock() which could re-enable IRQ prematurely leading to the following warning: raw_local_irq_restore() called with IRQs enabled WARNING: CPU: 1 PID: 96 at kernel/locking/irqflag-debug.c:10 warn_bogus_irq_restore+0x30/0x40 ... Sched_ext: create_dsq (enabling) pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : warn_bogus_irq_restore+0x30/0x40 lr : warn_bogus_irq_restore+0x30/0x40 ... Call trace: warn_bogus_irq_restore+0x30/0x40 (P) warn_bogus_irq_restore+0x30/0x40 (L) scx_ops_bypass+0x224/0x3b8 scx_ops_enable.isra.0+0x2c8/0xaa8 bpf_scx_reg+0x18/0x30 ... irq event stamp: 33739 hardirqs last enabled at (33739): [<ffff8000800b699c>] scx_ops_bypass+0x174/0x3b8 hardirqs last disabled at (33738): [<ffff800080d48ad4>] _raw_spin_lock_irqsave+0xb4/0xd8 Drop the stray _irqrestore().

AI-Powered Analysis

AILast updated: 06/28/2025, 08:41:12 UTC

Technical Analysis

CVE-2024-57891 is a vulnerability identified in the Linux kernel related to improper handling of interrupt request (IRQ) flags within the sched_ext subsystem, specifically in the function scx_ops_bypass(). The issue arose when a recent patch (commit 0e7ffff1b811) intended to fix race conditions by adding outer irqsave/restore locking neglected to convert an inner rq_unlock_irqrestore() call to rq_unlock(). This mistake caused premature re-enabling of IRQs, which violates kernel locking protocols and leads to warnings such as "raw_local_irq_restore() called with IRQs enabled." The improper IRQ state management can cause instability in kernel execution, potentially leading to unpredictable behavior or kernel warnings that may affect system reliability. The vulnerability does not appear to be directly exploitable for privilege escalation or code execution, as no known exploits are reported in the wild. However, it reflects a kernel locking bug that could cause system warnings and possibly impact kernel scheduling and interrupt handling. The fix involves removing the stray _irqrestore() call to ensure IRQs are not re-enabled prematurely, maintaining proper IRQ locking discipline in the kernel scheduler extension code.

Potential Impact

For European organizations relying on Linux-based systems, this vulnerability primarily poses a risk to system stability and reliability rather than direct security compromise. Systems running affected kernel versions may experience kernel warnings or instability related to IRQ handling, which could lead to degraded performance or unexpected behavior in critical applications, especially those sensitive to real-time scheduling or interrupt processing. While no direct exploitation is known, the presence of such kernel-level bugs can complicate system diagnostics and may increase the risk of downtime in production environments. Organizations with large-scale Linux deployments, including servers, embedded devices, or cloud infrastructure, could be affected if they use the impacted kernel versions. The impact is more operational than confidentiality or integrity related, but maintaining kernel stability is crucial for business continuity and service availability.

Mitigation Recommendations

European organizations should promptly apply the official Linux kernel patch that removes the stray _irqrestore() call in the sched_ext subsystem to restore correct IRQ locking behavior. Since this is a kernel-level fix, updating to the latest stable kernel version containing this patch is the most effective mitigation. Organizations should: 1) Identify all Linux systems running the affected kernel commit (0e7ffff1b811) or versions derived from it. 2) Test and deploy updated kernel versions from trusted Linux distributions or directly from the Linux kernel mainline that include the fix. 3) Monitor kernel logs for warnings related to irqflag-debug (e.g., "raw_local_irq_restore() called with IRQs enabled") to detect any residual issues. 4) For critical production systems, schedule maintenance windows to perform kernel upgrades to minimize operational disruption. 5) Engage with Linux distribution vendors for backported patches if immediate kernel upgrades are not feasible. 6) Maintain robust system monitoring and alerting to quickly identify any kernel instability symptoms post-patch.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-01-11T14:45:42.028Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9822c4522896dcbde9bc

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

Last enriched: 6/28/2025, 8:41:12 AM

Last updated: 7/30/2025, 9:35:03 PM

Views: 8

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