🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템 드라이버에서 run_get_highest_vcn() 함수가 데이터의 길이를 확인하지 않고 0x00 종료 문자에만 의존하여 버퍼를 읽는 취약점이 발견되었습니다. 공격자가 조작된 $LogFile UpdateMappingPairs 레코드를 포함한 NTFS 볼륨을 마운트할 경우, 할당된 메모리 범위를 벗어나 읽는 slab-out-of-bounds 오류가 발생합니다.
💡 쉬운 설명
NTFS 형식의 저장 장치를 컴퓨터에 연결할 때, 데이터의 끝을 제대로 확인하지 못해 메모리의 허용된 범위를 넘어 읽어버리는 문제입니다. 이로 인해 시스템이 불안정해지거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: add bounds check to run_get_highest_vcn()
run_get_highest_vcn() parses a packed NTFS mapping-pairs buffer without
any length bound, relying solely on a 0x00 terminator to stop. A
crafted $LogFile UpdateMappingPairs record whose embedded attribute
contains mapping-pairs runs without a terminator causes the function to
read past the slab allocation, triggering a KASAN slab-out-of-bounds
read on mount.
The sibling function run_unpack() received an analogous bounds-check in
commit b62567bca474 ("ntfs3: add buffer boundary checks to run_unpack()"),
but run_get_highest_vcn() was missed.
Take a run_buf_size parameter and reject any run header whose payload
would extend past the buffer end, mirroring the pattern used by
run_unpack(). The caller in fslog.c passes the remaining attribute
bytes after the mapping-pairs offset.
KASAN report (on mainline v7.1 merge window HEAD):
BUG: KASAN: slab-out-of-bounds in run_get_highest_vcn+0x3c0/0x410
Read of size 1 at addr ffff88800e2d5400 by task mount/72
Call Trace:
run_get_highest_vcn+0x3c0/0x410
do_action.isra.0+0x3ba8/0x7b50
log_replay+0x9ddd/0x10200
ntfs_loadlog_and_replay+0x4ad/0x610
ntfs_fill_super+0x214a/0x4540
📍 영향받는 시스템
Linux kernel (ntfs3 driver 사용 시스템)
⚔️ 공격 벡터
조작된 $LogFile UpdateMappingPairs 레코드가 포함된 NTFS 파일 시스템 마운트
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 run_get_highest_vcn()의 경계 검사 로직을 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.