🔍 CVE-2023-53577

7.8
CVSS Score
HIGH
2025-10-04
2026-08-04 10:19
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 BPF cpumap 구성 요소에서 kthread가 실행되기 전에 맵 업데이트가 반환되는 취약점이 발견되었습니다. 이로 인해 XDP 프로그램이 ptr_ring에 프레임을 큐에 넣었음에도 kthread가 조기에 중단되어 경고가 발생할 수 있습니다.

💡 쉬운 설명

리눅스 시스템의 데이터 처리 통로가 제대로 열리기도 전에 데이터가 들어와서 시스템이 혼란을 겪는 문제입니다. 이로 인해 시스템 경고가 발생하거나 예기치 않은 동작이 나타날 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: bpf, cpumap: Make sure kthread is running before map update returns The following warning was reported when running stress-mode enabled xdp_redirect_cpu with some RT threads: ------------[ cut here ]------------ WARNING: CPU: 4 PID: 65 at kernel/bpf/cpumap.c:135 CPU: 4 PID: 65 Comm: kworker/4:1 Not tainted 6.5.0-rc2+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Workqueue: events cpu_map_kthread_stop RIP: 0010:put_cpu_map_entry+0xda/0x220 ...... Call Trace: <TASK> ? show_regs+0x65/0x70 ? __warn+0xa5/0x240 ...... ? put_cpu_map_entry+0xda/0x220 cpu_map_kthread_stop+0x41/0x60 process_one_work+0x6b0/0xb80 worker_thread+0x96/0x720 kthread+0x1a5/0x1f0 ret_from_fork+0x3a/0x70 ret_from_fork_asm+0x1b/0x30 </TASK> The root cause is the same as commit 436901649731 ("bpf: cpumap: Fix memory leak in cpu_map_update_elem"). The kthread is stopped prematurely by kthread_stop() in cpu_map_kthread_stop(), and kthread() doesn't call cpu_map_kthread_run() at all but XDP program has already queued some frames or skbs into ptr_ring. So when __cpu_map_ring_cleanup() checks the ptr_ring, it will find it was not emptied and report a warning. An alternative fix is to use __cpu_map_ring_cleanup() to drop these pending frames or skbs when kthread_stop() returns -EINTR, but it may confuse the user, because these frames or skbs have been handled correctly by XDP program. So instead of dropping these frames or skbs, just make sure the per-cpu kthread is running before __cpu_map_entry_alloc() returns. After apply the fix, the error handle for kthread_stop() will be unnecessary because it will always return 0, so just remove it.

📍 영향받는 시스템

Linux kernel (specifically versions involving BPF cpumap and XDP, e.g., 6.5.0-rc2+)

⚔️ 공격 벡터

로컬 시스템에서 특정 XDP 프로그램을 실행하여 커널의 kthread 상태와 데이터 큐 간의 타이밍 문제를 유도

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 kthread 실행 보장 로직을 적용해야 합니다.

🔧 검증 코드

출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel