🇰🇷 한글 설명
리눅스 커널의 tracing/osnoise 구성 요소에서 bitmap_parselist() 함수 호출 시 NULL 포인터 역참조가 발생하는 취약점입니다. 사용자가 osnoise_cpus 설정 시 잘못된 매개변수를 전달할 경우 커널 크래시가 발생할 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 특정 기능을 설정할 때 잘못된 값을 입력하면 시스템이 갑자기 멈추거나 꺼질 수 있는 오류입니다. 이는 시스템의 안정성을 해칠 수 있는 결함입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tracing/osnoise: Fix null-ptr-deref in bitmap_parselist()
A crash was observed with the following output:
BUG: kernel NULL pointer dereference, address: 0000000000000010
Oops: Oops: 0000 [#1] SMP NOPTI
CPU: 2 UID: 0 PID: 92 Comm: osnoise_cpus Not tainted 6.17.0-rc4-00201-gd69eb204c255 #138 PREEMPT(voluntary)
RIP: 0010:bitmap_parselist+0x53/0x3e0
Call Trace:
<TASK>
osnoise_cpus_write+0x7a/0x190
vfs_write+0xf8/0x410
? do_sys_openat2+0x88/0xd0
ksys_write+0x60/0xd0
do_syscall_64+0xa4/0x260
entry_SYSCALL_64_after_hwframe+0x77/0x7f
</TASK>
This issue can be reproduced by below code:
fd=open("/sys/kernel/debug/tracing/osnoise/cpus", O_WRONLY);
write(fd, "0-2", 0);
When user pass 'count=0' to osnoise_cpus_write(), kmalloc() will return
ZERO_SIZE_PTR (16) and cpulist_parse() treat it as a normal value, which
trigger the null pointer dereference. Add check for the parameter 'count'.
📍 영향받는 시스템
Linux kernel (tracing/osnoise 모듈 사용 시)
⚔️ 공격 벡터
로컬 사용자가 /sys/kernel/debug/tracing/osnoise/cpus 파일에 잘못된 형식의 데이터를 작성하여 발생
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 osnoise_cpus_write()의 매개변수 검증 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전인지 확인합니다.