🇰🇷 한글 설명
Linux 커널의 perf/core 구성 요소에서 perf_iterate_ctx() 함수가 RCU 리스트를 순회할 때 적절한 RCU 읽기 잠금(RCU read lock) 보호를 제공하지 않는 취약점입니다. 이로 인해 CONFIG_PROVE_RCU_LIST가 활성화된 환경에서 lockdep 경고가 발생하며 커널의 안정성을 해칠 수 있습니다.
💡 쉬운 설명
컴퓨터의 성능을 측정하는 기능에서 데이터를 읽는 동안 데이터가 갑자기 바뀌지 않도록 잠그는 장치가 빠져 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Add RCU read lock protection to perf_iterate_ctx()
The perf_iterate_ctx() function performs RCU list traversal but
currently lacks RCU read lock protection. This causes lockdep warnings
when running perf probe with unshare(1) under CONFIG_PROVE_RCU_LIST=y:
WARNING: suspicious RCU usage
kernel/events/core.c:8168 RCU-list traversed in non-reader section!!
Call Trace:
lockdep_rcu_suspicious
? perf_event_addr_filters_apply
perf_iterate_ctx
perf_event_exec
begin_new_exec
? load_elf_phdrs
load_elf_binary
? lock_acquire
? find_held_lock
? bprm_execve
bprm_execve
do_execveat_common.isra.0
__x64_sys_execve
do_syscall_64
entry_SYSCALL_64_after_hwframe
This protection was previously present but was removed in commit
bd2756811766 ("perf: Rewrite core context handling"). Add back the
necessary rcu_read_lock()/rcu_read_unlock() pair around
perf_iterate_ctx() call in perf_event_exec().
[ mingo: Use scoped_guard() as suggested by Peter ]
📍 영향받는 시스템
RCU 리스트 순회 로직이 수정된 이후의 Linux Kernel 버전
⚔️ 공격 벡터
로컬 사용자가 특정 커널 설정 환경에서 perf probe 및 unshare를 사용하여 시스템 불안정 유도
🛡️ 대응 방법
RCU 읽기 잠금이 적용된 최신 Linux 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전인지 배포판 보안 공지를 통해 확인