CVE-2024-58070 in Linux정보

요약

\~에 의해 VulDB • 2026. 05. 20.

리눅스 커널에서 다음 취약점이 해결되었습니다:

bpf: bpf_local_storage: PREEMPT_RT에서 항상 bpf_mem_alloc 사용

PREEMPT_RT 환경에서는 비선점 가능(non-preemptible) 컨텍스트에서 kmalloc(GFP_ATOMIC)이 여전히 안전하지 않습니다. PREEMPT_RT에서는 bpf_mem_alloc을 사용해야 합니다. 이 패치는 CONFIG_PREEMPT_RT가 활성화된 경우 bpf_local_storage에서 bpf_mem_alloc을 강제 적용하는 것을 목적으로 합니다.

[ 35.118559] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
[ 35.118566] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1832, name: test_progs
[ 35.118569] preempt_count: 1, expected: 0
[ 35.118571] RCU nest depth: 1, expected: 1
[ 35.118577] INFO: lockdep is turned off.
... [ 35.118647] __might_resched+0x433/0x5b0
[ 35.118677] rt_spin_lock+0xc3/0x290
[ 35.118700] ___slab_alloc+0x72/0xc40
[ 35.118723] __kmalloc_noprof+0x13f/0x4e0
[ 35.118732] bpf_map_kzalloc+0xe5/0x220
[ 35.118740] bpf_selem_alloc+0x1d2/0x7b0
[ 35.118755] bpf_local_storage_update+0x2fa/0x8b0
[ 35.118784] bpf_sk_storage_get_tracing+0x15a/0x1d0
[ 35.118791] bpf_prog_9a118d86fca78ebb_trace_inet_sock_set_state+0x44/0x66
[ 35.118795] bpf_trace_run3+0x222/0x400
[ 35.118820] __bpf_trace_inet_sock_set_state+0x11/0x20
[ 35.118824] trace_inet_sock_set_state+0x112/0x130
[ 35.118830] inet_sk_state_store+0x41/0x90
[ 35.118836] tcp_set_state+0x3b3/0x640

bpf_mem_cache_alloc_flags()로 전달되는 gfp_flags를 조정할 필요는 없습니다. 이 함수는 GFP_KERNEL만 인정합니다. 검증자(verifier)는 GFP_KERNEL가 수면 가능(sleepable) 컨텍스트에서만 전달되도록 보장했습니다.

이 문제는 bpf_local_storage가 처음 도입된 지 약 5년 전부터 존재해 온 오래된 이슈이므로, 이 패치는 bpf-next를 대상으로 합니다.

이를 해결하기 위해 bpf_mem_alloc이 필요하므로, Fixes 태그는 bpf_mem_alloc이 bpf_local_storage에서 처음 사용된 커밋으로 설정됩니다.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

책임이 있는

Linux

예약하다

2025. 03. 06.

모더레이션

수락

항목

VDB-298838

EPSS

0.00133

출처

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!