🇰🇷 한글 설명
Linux 커널의 f2fs 파일 시스템에서 tracepoint 이벤트 처리 중 iocb 필드 할당 로직 오류로 인해 발생하는 취약점입니다. 특정 커밋에서 도입된 trace 이벤트가 포인터만 할당하고 실제 필드에 접근하는 과정에서 잘못된 메모리 주소를 참조하여 커널 패닉(Null Pointer Dereference 또는 Invalid Address Access)을 유발할 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 파일 저장 방식 중 하나인 f2fs에서 시스템 기록을 남기는 과정 중 실수로 잘못된 메모리 주소를 읽으려다 컴퓨터가 멈추는 문제입니다. 이로 인해 시스템이 갑자기 재부팅되거나 중단될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix the assign logic of iocb
commit 18ae8d12991b ("f2fs: show more DIO information in tracepoint")
introduces iocb field in 'f2fs_direct_IO_enter' trace event
And it only assigns the pointer and later it accesses its field
in trace print log.
Unable to handle kernel paging request at virtual address ffffffc04cef3d30
Mem abort info:
ESR = 0x96000007
EC = 0x25: DABT (current EL), IL = 32 bits
pc : trace_raw_output_f2fs_direct_IO_enter+0x54/0xa4
lr : trace_raw_output_f2fs_direct_IO_enter+0x2c/0xa4
sp : ffffffc0443cbbd0
x29: ffffffc0443cbbf0 x28: ffffff8935b120d0 x27: ffffff8935b12108
x26: ffffff8935b120f0 x25: ffffff8935b12100 x24: ffffff8935b110c0
x23: ffffff8935b10000 x22: ffffff88859a936c x21: ffffff88859a936c
x20: ffffff8935b110c0 x19: ffffff8935b10000 x18: ffffffc03b195060
x17: ffffff8935b11e76 x16: 00000000000000cc x15: ffffffef855c4f2c
x14: 0000000000000001 x13: 000000000000004e x12: ffff0000ffffff00
x11: ffffffef86c350d0 x10: 00000000000010c0 x9 : 000000000fe0002c
x8 : ffffffc04cef3d28 x7 : 7f7f7f7f7f7f7f7f x6 : 0000000002000000
x5 : ffffff8935b11e9a x4 : 0000000000006250 x3 : ffff0a00ffffff04
x2 : 0000000000000002 x1 : ffffffef86a0a31f x0 : ffffff8935b10000
Call trace:
trace_raw_output_f2fs_direct_IO_enter+0x54/0xa4
print_trace_fmt+0x9c/0x138
print_trace_line+0x154/0x254
tracing_read_pipe+0x21c/0x380
vfs_read+0x108/0x3ac
ksys_read+0x7c/0xec
__arm64_sys_read+0x20/0x30
invoke_syscall+0x60/0x150
el0_svc_common.llvm.1237943816091755067+0xb8/0xf8
do_el0_svc+0x28/0xa0
Fix it by copying the required variables for printing and while at
it fix the similar issue at some other places in the same file.
📍 영향받는 시스템
Linux kernel (f2fs module 사용 환경)
⚔️ 공격 벡터
로컬 사용자가 특정 시스템 호출(vfs_read 등)을 유도하여 커널 메모리 오류를 발생시킴
🛡️ 대응 방법
f2fs 관련 커널 패치가 적용된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인