CVE-2024-50138 Information
Description
In the Linux kernel the following vulnerability has been resolved:
bpf: Use raw_spinlock_t in ringbuf
The function __bpf_ringbuf_reserve is invoked from a tracepoint which disables preemption. Using spinlock_t in this context can lead to a \sleep in atomic\ warning in the RT variant. This issue is illustrated in the example below:
BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
in_atomic(): 1 irqs_disabled(): 0 non_block: 0 pid: 556208 name: test_progs
preempt_count: 1 expected: 0
RCU nest depth: 1 expected: 1
INFO: lockdep is turned off.
Preemption disabled at:
[
Switch the spinlock to raw_spinlock_t to avoid this error.
Reference
https://git.kernel.org/stable/c/5eb34999d118e69a20dc0c6556f315fcb0a1f8d3 https://git.kernel.org/stable/c/ca30e682e5d6de44d12c4610767811c9a21d59ba https://git.kernel.org/stable/c/8b62645b09f870d70c7910e7550289d444239a46
Share on: