🇰🇷 한글 설명
Linux 커널의 EROFS 파일 시스템에서 비압축 HEAD 인덱스의 clusterofs 값이 유효 범위를 벗어날 경우 발생하는 취약점입니다. 조작된 이미지를 마운트할 때 커널이 잘못된 메모리 주소에 접근하여 페이지 폴트(Page Fault)를 유발하고 시스템이 충돌할 수 있습니다.
💡 쉬운 설명
특수하게 만들어진 가짜 파일 시스템 이미지를 컴퓨터에 연결하면, 컴퓨터의 두뇌 역할을 하는 커널이 길을 잃고 멈춰버릴 수 있습니다. 이는 시스템이 갑자기 꺼지거나 오류가 발생하는 원인이 됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
erofs: stop parsing non-compact HEAD index if clusterofs is invalid
Syzbot generated a crafted image [1] with a non-compact HEAD index of
clusterofs 33024 while valid numbers should be 0 ~ lclustersize-1,
which causes the following unexpected behavior as below:
BUG: unable to handle page fault for address: fffff52101a3fff9
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 23ffed067 P4D 23ffed067 PUD 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4398 Comm: kworker/u5:1 Not tainted 6.3.0-rc6-syzkaller-g09a9639e56c0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
Workqueue: erofs_worker z_erofs_decompressqueue_work
RIP: 0010:z_erofs_decompress_queue+0xb7e/0x2b40
...
Call Trace:
<TASK>
z_erofs_decompressqueue_work+0x99/0xe0
process_one_work+0x8f6/0x1170
worker_thread+0xa63/0x1210
kthread+0x270/0x300
ret_from_fork+0x1f/0x30
Note that normal images or images using compact indexes are not
impacted. Let's fix this now.
[1] https://lore.kernel.org/r/
[email protected]
📍 영향받는 시스템
Linux kernel (EROFS 파일 시스템을 사용하는 환경, 특히 6.3.0-rc6 이전 버전)
⚔️ 공격 벡터
조작된 clusterofs 값을 포함한 EROFS 이미지 파일을 시스템에 마운트하거나 읽기 시도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 EROFS의 clusterofs 유효성 검사 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인합니다.