🇰🇷 한글 설명
Linux 커널의 nstree 구성 요소에서 네임스페이스 참조를 취하기 전에 권한을 먼저 확인하지 않는 취약점이 발견되었습니다. 이로 인해 RCU 읽기 측 임계 구역 내에서 자발적인 컨텍스트 스위칭이 발생하여 커널 패닉이나 시스템 불안정을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 시스템(커널)이 권한이 없는 사용자의 요청을 처리하는 과정에서 순서가 잘못되어 시스템이 멈추거나 오류가 발생할 수 있는 문제입니다. 보안 검사를 하기 전에 먼저 자원을 점유해버리는 설계 오류가 원인입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nstree: check listing permission before taking a namespace reference
legitimize_ns() takes a reference on the candidate namespace before
may_list_ns() has decided whether the caller may see it. The
__free(ns_put) cleanup on the denied path can drop the last reference to a
mount namespace while we still hold the rcu read lock, and put_mnt_ns()
may sleep there. This is the same problem commit 2ec2aff3c8e2 ("ns: make
sure reference are dropped outside of rcu lock") fixed for the put_user()
path. Neither ns_requested() nor may_list_ns() needs a reference, both
only look at the namespace type and at the caller's own namespaces, so do
the checks first and take the reference last.
Splat:
Voluntary context switch within RCU read-side critical section!
WARNING: kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x238/0x2a0, CPU#5: a/3442
CPU: 5 UID: 1000 PID: 3442 Comm: a Not tainted 7.0.0-30-generic #30-Ubuntu PREEMPT(lazy)
RIP: 0010:rcu_note_context_switch+0x238/0x2a0
Call Trace:
<TASK>
__schedule+0xcf/0x650
schedule+0x27/0x90
schedule_preempt_disabled+0x15/0x30
__mutex_lock.constprop.0+0x550/0xaf0
__mutex_lock_slowpath+0x13/0x20
mutex_lock+0x3b/0x50
exp_funnel_lock+0xb2/0x260
synchronize_rcu_expedited+0xe7/0x220
namespace_unlock+0x26a/0x320
put_mnt_ns+0xd3/0x120
mntns_put+0xe/0x20
do_listns+0x13e/0x560
__do_sys_listns+0x126/0x2d0
__x64_sys_listns+0x20/0x30
x64_sys_call+0x2366/0x2390
do_syscall_64+0x105/0x5a0
entry_SYSCALL_64_after_hwframe+0x76/0x7e
</TASK>
📍 영향받는 시스템
Linux kernel (specifically versions prior to the fix for CVE-2026-97971)
⚔️ 공격 벡터
로컬 사용자가 특수하게 조작된 시스템 호출(listns 등)을 통해 커널의 RCU 임계 구역 내에서 잠자기(sleep)를 유도하여 시스템을 불안정하게 만듦
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.