🇰🇷 한글 설명
Linux 커널의 rseq_exit_user_update() 함수에서 초기화되지 않은 스택 변수를 사용하는 취약점이 발견되었습니다. 초기화 리스트 내의 표현식 평가 순서가 결정되지 않아, 특정 컴파일러 환경에서 변수가 할당되기 전에 해당 변수를 참조하여 커널 정보가 유출될 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 저장할 때 아직 값이 채워지지 않은 빈 공간을 잘못 읽어버리는 오류입니다. 이로 인해 시스템 내부의 중요한 정보가 외부로 흘러나갈 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
rseq: Fix using an uninitialized stack variable in rseq_exit_user_update()
There is an bug in which an uninitialized stack variable is used in
rseq_exit_user_update() as reported by syzbot:
BUG: KMSAN: kernel-infoleak in rseq_set_ids_get_csaddr include/linux/rseq_entry.h:502 [inline]
The local variable:
struct rseq_ids ids = {
.cpu_id = task_cpu(t),
.mm_cid = task_mm_cid(t),
.node_id = cpu_to_node(ids.cpu_id),
};
According to the C standard, the evaluation order of expressions in an
initializer list is indeterminately sequenced. The compiler (Clang, in
this KMSAN build) evaluates `cpu_to_node(ids.cpu_id)` *before*
`ids.cpu_id` is initialized with `task_cpu(t)`.
This is fixed by moving the assignment of ids.node_id outside the
structure initialization.
📍 영향받는 시스템
rseq 기능을 사용하는 Linux 커널 (KMSAN 탐지 기준)
⚔️ 공격 벡터
커널 메모리 내의 초기화되지 않은 스택 데이터를 읽어내는 정보 유출(Information Leak) 공격
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트하거나, 구조체 초기화 방식을 수정한 패치를 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 취약점이 해결된 패치 버전 이상인지 확인합니다.