Skip to main content

CVE-2024-45020: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-45020cvecve-2024-45020
Published: Wed Sep 11 2024 (09/11/2024, 15:13:54 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix a kernel verifier crash in stacksafe() Daniel Hodges reported a kernel verifier crash when playing with sched-ext. Further investigation shows that the crash is due to invalid memory access in stacksafe(). More specifically, it is the following code: if (exact != NOT_EXACT && old->stack[spi].slot_type[i % BPF_REG_SIZE] != cur->stack[spi].slot_type[i % BPF_REG_SIZE]) return false; The 'i' iterates old->allocated_stack. If cur->allocated_stack < old->allocated_stack the out-of-bound access will happen. To fix the issue add 'i >= cur->allocated_stack' check such that if the condition is true, stacksafe() should fail. Otherwise, cur->stack[spi].slot_type[i % BPF_REG_SIZE] memory access is legal.

AI-Powered Analysis

AILast updated: 06/28/2025, 23:56:19 UTC

Technical Analysis

CVE-2024-45020 is a vulnerability identified in the Linux kernel's Berkeley Packet Filter (BPF) subsystem, specifically related to the kernel verifier's stacksafe() function. The issue arises from an invalid memory access during verification of BPF programs that use extended scheduling features (sched-ext). The root cause is a missing boundary check in the stacksafe() function: when iterating over the 'old->allocated_stack' array, the code accesses 'cur->stack[spi].slot_type' without verifying that the index 'i' is less than 'cur->allocated_stack'. If 'cur->allocated_stack' is smaller than 'old->allocated_stack', this leads to an out-of-bounds read, causing the kernel verifier to crash. This crash can potentially be triggered by a crafted BPF program, leading to denial of service (DoS) by crashing the kernel verifier, which is critical for loading and validating BPF programs. The fix involves adding a check to ensure 'i >= cur->allocated_stack' causes stacksafe() to fail safely, preventing out-of-bounds access. Since BPF programs are widely used for network packet filtering, tracing, and security monitoring, this vulnerability could affect any Linux system running vulnerable kernel versions that support BPF and sched-ext features. No known exploits are reported in the wild as of now, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the impact of CVE-2024-45020 primarily involves potential denial of service conditions on Linux systems that utilize BPF for networking, security, or performance monitoring. Since BPF is integral to many modern Linux distributions and is used extensively in cloud infrastructure, container environments, and network appliances, a successful exploitation could disrupt critical services by crashing the kernel verifier, preventing BPF programs from loading or running correctly. This could degrade network security monitoring, packet filtering, or system tracing capabilities, potentially exposing organizations to further risks. Additionally, if attackers can repeatedly trigger the crash, it may lead to system instability or downtime. While this vulnerability does not directly lead to privilege escalation or code execution, the resulting service disruption could impact availability and operational continuity, which is significant for sectors relying on high availability such as finance, healthcare, and critical infrastructure within Europe.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2024-45020 as soon as vendor patches become available. Until patched, administrators should audit the use of BPF programs, especially those leveraging extended scheduling features (sched-ext), and restrict untrusted users from loading or modifying BPF programs. Implementing strict access controls on who can load BPF programs (e.g., limiting CAP_BPF or CAP_SYS_ADMIN capabilities) reduces the attack surface. Monitoring kernel logs for verifier crashes can provide early detection of attempted exploitation. For environments using containers or orchestration platforms, ensure that container runtimes and orchestration tools are configured to prevent unprivileged BPF program loading. Additionally, applying kernel lockdown features or mandatory access control policies (e.g., SELinux, AppArmor) can help mitigate exploitation risks. Finally, organizations should maintain robust incident response plans to quickly address any service disruptions caused by this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-08-21T05:34:56.683Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9826c4522896dcbe0ef5

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

Last enriched: 6/28/2025, 11:56:19 PM

Last updated: 8/12/2025, 4:06:37 PM

Views: 14

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