CVE-2024-50138
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
05/11/2024
Last modified:
24/03/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
bpf: Use raw_spinlock_t in ringbuf<br />
<br />
The function __bpf_ringbuf_reserve is invoked from a tracepoint, which<br />
disables preemption. Using spinlock_t in this context can lead to a<br />
"sleep in atomic" warning in the RT variant. This issue is illustrated<br />
in the example below:<br />
<br />
BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48<br />
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 556208, name: test_progs<br />
preempt_count: 1, expected: 0<br />
RCU nest depth: 1, expected: 1<br />
INFO: lockdep is turned off.<br />
Preemption disabled at:<br />
[] migrate_enable+0xc0/0x39c<br />
CPU: 7 PID: 556208 Comm: test_progs Tainted: G<br />
Hardware name: Qualcomm SA8775P Ride (DT)<br />
Call trace:<br />
dump_backtrace+0xac/0x130<br />
show_stack+0x1c/0x30<br />
dump_stack_lvl+0xac/0xe8<br />
dump_stack+0x18/0x30<br />
__might_resched+0x3bc/0x4fc<br />
rt_spin_lock+0x8c/0x1a4<br />
__bpf_ringbuf_reserve+0xc4/0x254<br />
bpf_ringbuf_reserve_dynptr+0x5c/0xdc<br />
bpf_prog_ac3d15160d62622a_test_read_write+0x104/0x238<br />
trace_call_bpf+0x238/0x774<br />
perf_call_bpf_enter.isra.0+0x104/0x194<br />
perf_syscall_enter+0x2f8/0x510<br />
trace_sys_enter+0x39c/0x564<br />
syscall_trace_enter+0x220/0x3c0<br />
do_el0_svc+0x138/0x1dc<br />
el0_svc+0x54/0x130<br />
el0t_64_sync_handler+0x134/0x150<br />
el0t_64_sync+0x17c/0x180<br />
<br />
Switch the spinlock to raw_spinlock_t to avoid this error.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.8 (including) | 6.1.115 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.11.6 (excluding) |
cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page