🔍 CVE-2026-43402

9.8
CVSS Score
CRITICAL
2026-05-08
2026-10-19 20:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 kthread 종료 경로에서 use-after-free 취약점이 발생합니다. 메모리 레이아웃 변화로 인해 struct kthread와 struct pid이 같은 메모리 영역을 공유하게 되어, kthread가 make_task_dead()를 통해 종료될 때 affinity_node 정리를 건너뛰면서 이미 해제된 메모리가 RCU 콜백 함수 포인터를 통해 접근되어 시스템 크래시가 발생합니다.

💡 쉬운 설명

Linux 커널에서 작업 종료 시 일부 정리 작업을 건너뛰어서 이미 해제된 메모리에 다시 접근하게 되는 문제입니다. 이로 인해 시스템이 예기치 않게 중단될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: kthread: consolidate kthread exit paths to prevent use-after-free Guillaume reported crashes via corrupted RCU callback function pointers during KUnit testing. The crash was traced back to the pidfs rhashtable conversion which replaced the 24-byte rb_node with an 8-byte rhash_head in struct pid, shrinking it from 160 to 144 bytes. struct kthread (without CONFIG_BLK_CGROUP) is also 144 bytes. With CONFIG_SLAB_MERGE_DEFAULT and SLAB_HWCACHE_ALIGN both round up to 192 bytes and share the same slab cache. struct pid.rcu.func and struct kthread.affinity_node both sit at offset 0x78. When a kthread exits via make_task_dead() it bypasses kthread_exit() and misses the affinity_node cleanup. free_kthread_struct() frees the memory while the node is still linked into the global kthread_affinity_list. A subsequent list_del() by another kthread writes through dangling list pointers into the freed and reused memory, corrupting the pid's rcu.func pointer. Instead of patching free_kthread_struct() to handle the missed cleanup, consolidate all kthread exit paths. Turn kthread_exit() into a macro that calls do_exit() and add kthread_do_exit() which is called from do_exit() for any task with PF_KTHREAD set. This guarantees that kthread-specific cleanup always happens regardless of the exit path - make_task_dead(), direct do_exit(), or kthread_exit(). Replace __to_kthread() with a new tsk_is_kthread() accessor in the public header. Export do_exit() since module code using the kthread_exit() macro now needs it directly.

📍 영향받는 시스템

Linux 커널 (CONFIG_BLK_CGROUP, CONFIG_SLAB_MERGE_DEFAULT, SLAB_HWCACHE_ALIGN 설정된 시스템)

⚔️ 공격 벡터

로컬 공격자가 특정 kthread 종료 조건을 유발하여 메모리 손상 및 시스템 크래시를 일으킬 수 있습니다.

🛡️ 대응 방법

Linux 커널을 취약점 패치가 포함된 최신 버전으로 업데이트합니다.

🔧 검증 코드

커널 버전 확인 후 시스템 로그에서 use-after-free, RCU 콜백 또는 kthread 크래시 관련 메시지가 있는지 확인합니다. 메시지가 없으면 시스템이 패치된 상태입니다.

Shell / Script
uname -r && dmesg | grep -iE 'use.after.free|rcu.*callback|kthread.*crash' | head -3

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel