🇰🇷 한글 설명
Linux 커널의 isofs 모듈에서 zisofs 빈 블록 처리 시 페이지 배열의 범위를 벗어난 접근이 발생하는 취약점입니다. 조작된 Rock Ridge 레코드를 포함한 ISO9660 이미지를 마운트하고 압축된 파일을 읽을 때 메모리 경계를 초과하여 읽기가 발생합니다.
💡 쉬운 설명
특수하게 만들어진 가짜 CD 이미지 파일을 컴퓨터에 연결하고 파일을 읽으려고 하면, 시스템의 메모리 관리 영역을 침범하여 오류를 일으킬 수 있는 문제입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
isofs: fix out-of-bounds page array access on empty zisofs block
zisofs_uncompress_block()'s empty-block fast path returns
pcount << PAGE_SHIFT, ignoring the incoming poffset, unlike the
decompression path which returns bytes produced relative to poffset.
zisofs_fill_pages() uses that return to advance its page cursor, so when
the zisofs block size is below PAGE_SIZE and a sub-page block leaves
poffset partway into a page, a following empty block over-counts and
advances pages[] one element past its end, after which
"if (poffset && *pages)" reads pages[1] out of bounds. rock.c only
rejects a block-size shift > 17, so a crafted "ZF" Rock Ridge record can
set it below PAGE_SHIFT; the bug is reached by an ordinary read() of a
compressed file on such a mounted ISO9660 image.
Return the byte count relative to poffset and zero only
[poffset, PAGE_SIZE) of the first page, matching the decompression path.
The page-aligned case (poffset == 0) is unaffected.
BUG: KASAN: slab-out-of-bounds in zisofs_read_folio (fs/isofs/compress.c:290)
Read of size 8 at addr ffff88800f5eac48 by task exploit/142
zisofs_read_folio (fs/isofs/compress.c:290)
read_pages (mm/readahead.c:184)
...
filemap_read (mm/filemap.c:2814)
vfs_read (fs/read_write.c:574)
__x64_sys_pread64 (fs/read_write.c:769)
do_syscall_64 (arch/x86/entry/syscall_64.c:94)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
The buggy address is located 0 bytes to the right of the
allocated 8-byte region in the kmalloc-8 cache
📍 영향받는 시스템
Linux kernel (isofs/zisofs module 사용 시스템)
⚔️ 공격 벡터
조작된 Rock Ridge 레코드가 포함된 압축된 ISO9660 이미지를 마운트한 후 일반적인 read() 시스템 호출 수행
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 zisofs_uncompress_block()의 반환 값 로직 수정 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.