🇰🇷 한글 설명
Linux 커널의 futex 구현 중 futex_key_to_node_opt()와 vma_replace_policy() 사이에서 Use-After-Free(UaF) 취약점이 발견되었습니다. mbind() 호출 시 기존 mempolicy가 즉시 해제되면서, 경합 조건(Race Condition)으로 인해 해제된 메모리 포인터를 참조하여 시스템 오류나 보안 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리를 관리하는 과정에서, 이미 사용이 끝나서 버려진 메모리 주소를 프로그램이 다시 읽으려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
futex: Fix UaF between futex_key_to_node_opt() and vma_replace_policy()
During futex_key_to_node_opt() execution, vma->vm_policy is read under
speculative mmap lock and RCU. Concurrently, mbind() may call
vma_replace_policy() which frees the old mempolicy immediately via
kmem_cache_free().
This creates a race where __futex_key_to_node() dereferences a freed
mempolicy pointer, causing a use-after-free read of mpol->mode.
[ 151.412631] BUG: KASAN: slab-use-after-free in __futex_key_to_node (kernel/futex/core.c:349)
[ 151.414046] Read of size 2 at addr ffff888001c49634 by task e/87
[ 151.415969] Call Trace:
[ 151.416732] __asan_load2 (mm/kasan/generic.c:271)
[ 151.416777] __futex_key_to_node (kernel/futex/core.c:349)
[ 151.416822] get_futex_key (kernel/futex/core.c:374 kernel/futex/core.c:386 kernel/futex/core.c:593)
Fix by adding rcu to __mpol_put().
📍 영향받는 시스템
Linux Kernel (futex 및 mbind 관련 기능이 활성화된 버전)
⚔️ 공격 벡터
특수하게 조작된 mbind()와 futex 관련 시스템 호출을 동시에 실행하여 경합 조건을 유도하는 방식
🛡️ 대응 방법
RCU(Read-Copy-Update) 메커니즘을 적용하여 __mpol_put() 호출 시 메모리 해제 시점을 안전하게 관리하도록 커널을 업데이트해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.