🇰🇷 한글 설명
Linux 커널의 ntfs3 드라이버에서 발생하는 취약점으로, 조작된 NTFS 이미지의 인덱스 블록 크기 불일치를 이용해 힙 메모리 경계를 넘어서는 쓰기(Out-of-bounds write)가 발생합니다. 공격자는 이를 통해 커널 메모리를 오염시키고 시스템 권한을 탈취하거나 서비스 거부를 유발할 수 있습니다.
💡 쉬운 설명
나쁜 의도로 만들어진 NTFS 저장 장치를 컴퓨터에 연결하면, 컴퓨터의 핵심 메모리 영역에 잘못된 데이터를 써넣어 시스템을 망가뜨릴 수 있는 결함입니다. 이 결함은 메모리 관리 규칙을 어기고 허용된 범위를 넘어서 데이터를 저장하기 때문에 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ntfs3: bound to_move in indx_insert_into_root before hdr_insert_head
indx_insert_into_root() promotes a full resident $INDEX_ROOT into
$INDEX_ALLOCATION and copies all non-last resident root entries into
a newly allocated INDEX_BUFFER via hdr_insert_head(). The source
byte count 'to_move' is summed from the on-disk resident entry sizes
and is independent of the destination buffer size, which comes from
root->index_block_size (via indx->index_bits).
A crafted NTFS image that keeps a valid, full resident root but
shrinks root->index_block_size down to 512 after the root has been
populated makes hdr_insert_head() memcpy attacker-controlled resident
entry bytes past the end of the kmalloc(1u << indx->index_bits)
allocation returned by indx_new(). For a 512-byte destination and a
resident root whose non-last entries total 560 bytes, the memcpy
overruns by 120 bytes and a following memmove extends the highest
written offset to 136 bytes past the allocation. The overflow bytes
are a direct copy of on-disk entries (via kmemdup), so they are
fully attacker-controlled.
The write is reachable from unprivileged open(O_CREAT) on a mounted
crafted NTFS image: a single sufficiently long create in a directory
whose resident root is already full forces root promotion and
triggers the copy.
This is a controlled out-of-bounds write of 120-136 bytes past a
kmalloc(index_block_size) allocation, with attacker-controlled
content. It is a bounded adjacent-heap corruption primitive; it is
not an arbitrary-address write. Successful exploitation into a named
victim object depends on the surrounding slab layout.
Reject the copy at the sink. The destination's INDEX_HDR already
reports hdr_total (the payload capacity of the new buffer) and
hdr_used (the bytes already consumed by the terminal END entry
installed by indx_new()); require that to_move fits in the remaining
payload before calling hdr_insert_head(). On mismatch, fail with
-EINVAL and mark the filesystem as having a detected on-disk
inconsistency, which is the same behaviour as the surrounding
validation in this function.
📍 영향받는 시스템
Linux kernel (ntfs3 driver 사용 환경)
⚔️ 공격 벡터
조작된 NTFS 이미지가 마운트된 상태에서 권한이 없는 사용자가 특정 파일 생성 작업을 수행하여 트리거
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ntfs3 드라이버의 메모리 검증 로직을 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인