🇰🇷 한글 설명
리눅스 커널의 tracing 기능 중 trace_seq_to_buffer() 함수에서 경계 검사 미흡으로 인한 Out-of-bounds(OOB) 쓰기 취약점이 발견되었습니다. 이 취약점은 데이터 복사 시 PAGE_SIZE보다 큰 데이터를 버퍼에 쓰려고 시도할 때 발생합니다.
💡 쉬운 설명
컴퓨터의 기록을 남기는 기능에서 정해진 저장 공간보다 더 많은 데이터를 억지로 밀어 넣으려다 발생하는 오류입니다. 이로 인해 시스템의 중요한 데이터가 덮어씌워지거나 시스템이 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix oob write in trace_seq_to_buffer()
syzbot reported this bug:
==================================================================
BUG: KASAN: slab-out-of-bounds in trace_seq_to_buffer kernel/trace/trace.c:1830 [inline]
BUG: KASAN: slab-out-of-bounds in tracing_splice_read_pipe+0x6be/0xdd0 kernel/trace/trace.c:6822
Write of size 4507 at addr ffff888032b6b000 by task syz.2.320/7260
CPU: 1 UID: 0 PID: 7260 Comm: syz.2.320 Not tainted 6.15.0-rc1-syzkaller-00301-g3bde70a2c827 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xc3/0x670 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
check_region_inline mm/kasan/generic.c:183 [inline]
kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189
__asan_memcpy+0x3c/0x60 mm/kasan/shadow.c:106
trace_seq_to_buffer kernel/trace/trace.c:1830 [inline]
tracing_splice_read_pipe+0x6be/0xdd0 kernel/trace/trace.c:6822
....
==================================================================
It has been reported that trace_seq_to_buffer() tries to copy more data
than PAGE_SIZE to buf. Therefore, to prevent this, we should use the
smaller of trace_seq_used(&iter->seq) and PAGE_SIZE as an argument.
📍 영향받는 시스템
Linux kernel (syzbot이 보고한 6.15.0-rc1 버전 포함 관련 tracing 기능 사용 커널)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 tracing 관련 시스템 호출(splice_read 등)을 조작하여 커널 메모리 영역에 비정상적인 데이터를 기록
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 trace_seq_to_buffer()의 경계 검사 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전인지 확인합니다.