Skip to main content

CVE-2024-43910: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-43910cvecve-2024-43910
Published: Mon Aug 26 2024 (08/26/2024, 10:11:14 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: add missing check_func_arg_reg_off() to prevent out-of-bounds memory accesses Currently, it's possible to pass in a modified CONST_PTR_TO_DYNPTR to a global function as an argument. The adverse effects of this is that BPF helpers can continue to make use of this modified CONST_PTR_TO_DYNPTR from within the context of the global function, which can unintentionally result in out-of-bounds memory accesses and therefore compromise overall system stability i.e. [ 244.157771] BUG: KASAN: slab-out-of-bounds in bpf_dynptr_data+0x137/0x140 [ 244.161345] Read of size 8 at addr ffff88810914be68 by task test_progs/302 [ 244.167151] CPU: 0 PID: 302 Comm: test_progs Tainted: G O E 6.10.0-rc3-00131-g66b586715063 #533 [ 244.174318] Call Trace: [ 244.175787] <TASK> [ 244.177356] dump_stack_lvl+0x66/0xa0 [ 244.179531] print_report+0xce/0x670 [ 244.182314] ? __virt_addr_valid+0x200/0x3e0 [ 244.184908] kasan_report+0xd7/0x110 [ 244.187408] ? bpf_dynptr_data+0x137/0x140 [ 244.189714] ? bpf_dynptr_data+0x137/0x140 [ 244.192020] bpf_dynptr_data+0x137/0x140 [ 244.194264] bpf_prog_b02a02fdd2bdc5fa_global_call_bpf_dynptr_data+0x22/0x26 [ 244.198044] bpf_prog_b0fe7b9d7dc3abde_callback_adjust_bpf_dynptr_reg_off+0x1f/0x23 [ 244.202136] bpf_user_ringbuf_drain+0x2c7/0x570 [ 244.204744] ? 0xffffffffc0009e58 [ 244.206593] ? __pfx_bpf_user_ringbuf_drain+0x10/0x10 [ 244.209795] bpf_prog_33ab33f6a804ba2d_user_ringbuf_callback_const_ptr_to_dynptr_reg_off+0x47/0x4b [ 244.215922] bpf_trampoline_6442502480+0x43/0xe3 [ 244.218691] __x64_sys_prlimit64+0x9/0xf0 [ 244.220912] do_syscall_64+0xc1/0x1d0 [ 244.223043] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 244.226458] RIP: 0033:0x7ffa3eb8f059 [ 244.228582] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 8f 1d 0d 00 f7 d8 64 89 01 48 [ 244.241307] RSP: 002b:00007ffa3e9c6eb8 EFLAGS: 00000206 ORIG_RAX: 000000000000012e [ 244.246474] RAX: ffffffffffffffda RBX: 00007ffa3e9c7cdc RCX: 00007ffa3eb8f059 [ 244.250478] RDX: 00007ffa3eb162b4 RSI: 0000000000000000 RDI: 00007ffa3e9c7fb0 [ 244.255396] RBP: 00007ffa3e9c6ed0 R08: 00007ffa3e9c76c0 R09: 0000000000000000 [ 244.260195] R10: 0000000000000000 R11: 0000000000000206 R12: ffffffffffffff80 [ 244.264201] R13: 000000000000001c R14: 00007ffc5d6b4260 R15: 00007ffa3e1c7000 [ 244.268303] </TASK> Add a check_func_arg_reg_off() to the path in which the BPF verifier verifies the arguments of global function arguments, specifically those which take an argument of type ARG_PTR_TO_DYNPTR | MEM_RDONLY. Also, process_dynptr_func() doesn't appear to perform any explicit and strict type matching on the supplied register type, so let's also enforce that a register either type PTR_TO_STACK or CONST_PTR_TO_DYNPTR is by the caller.

AI-Powered Analysis

AILast updated: 06/28/2025, 22:40:43 UTC

Technical Analysis

CVE-2024-43910 is a vulnerability identified in the Linux kernel's Berkeley Packet Filter (BPF) subsystem. The issue arises due to a missing validation function, check_func_arg_reg_off(), which is critical for verifying the arguments passed to global BPF functions, specifically those arguments of type CONST_PTR_TO_DYNPTR or ARG_PTR_TO_DYNPTR with MEM_RDONLY attribute. The vulnerability allows a modified CONST_PTR_TO_DYNPTR to be passed as an argument to a global function, enabling BPF helpers to use this altered pointer within the global function's context. This can lead to out-of-bounds memory accesses, compromising system stability and potentially leading to kernel crashes or memory corruption. The kernel's Address Sanitizer (KASAN) logs indicate slab-out-of-bounds reads, which are symptomatic of this flaw. The root cause is the lack of strict type checking in process_dynptr_func() on the register types supplied, which should be limited to PTR_TO_STACK or CONST_PTR_TO_DYNPTR. The fix involves adding the missing check_func_arg_reg_off() validation and enforcing stricter type checks to prevent misuse of dynamic pointers in BPF programs. Since BPF programs run in kernel space and are widely used for networking, tracing, and security monitoring, this vulnerability poses a significant risk if exploited. However, there are no known exploits in the wild at the time of publication, and the vulnerability was reserved and published in August 2024.

Potential Impact

For European organizations, the impact of CVE-2024-43910 can be substantial, especially for those relying heavily on Linux-based infrastructure, including servers, cloud environments, and embedded systems. The BPF subsystem is integral to many modern Linux kernels for packet filtering, performance monitoring, and security enforcement. Exploitation could lead to kernel crashes, denial of service, or potentially privilege escalation if combined with other vulnerabilities. This could disrupt critical services, impact availability, and compromise system integrity. Organizations in sectors such as finance, telecommunications, government, and critical infrastructure, which often deploy Linux extensively, may face operational disruptions or increased risk of targeted attacks. Additionally, the complexity of the vulnerability means that sophisticated attackers with kernel-level access could leverage it to bypass security controls or maintain persistence. Given the lack of known exploits, the immediate risk is moderate, but the potential for future exploitation necessitates prompt remediation.

Mitigation Recommendations

To mitigate CVE-2024-43910, European organizations should: 1) Apply the latest Linux kernel patches that include the fix for this vulnerability as soon as they become available from trusted sources or Linux distribution vendors. 2) Audit and restrict the use of BPF programs, especially those that allow untrusted users to load or execute BPF code, to minimize exposure. 3) Implement strict access controls and monitoring on systems that permit BPF program loading, using tools like seccomp or SELinux to limit kernel interaction. 4) Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and Kernel Page Table Isolation (KPTI) to reduce exploitation likelihood. 5) Monitor kernel logs and system behavior for anomalies indicative of out-of-bounds memory access or crashes related to BPF operations. 6) Educate system administrators and security teams about this vulnerability to ensure timely patch management and incident response readiness. 7) For environments using custom or third-party BPF programs, conduct thorough code reviews to ensure compliance with safe pointer usage and argument validation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-08-17T09:11:59.294Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9826c4522896dcbe0c44

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

Last enriched: 6/28/2025, 10:40:43 PM

Last updated: 8/15/2025, 9:28:39 AM

Views: 13

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