🇰🇷 한글 설명
Linux 커널의 NTFS 드라이버에서 index_root의 엔트리 크기가 할당된 버퍼 크기를 초과하는지 확인하지 않아 발생하는 힙 기반 Out-of-Bounds(OOB) Write 취약점입니다. ntfs_ir_to_ib() 함수에서 memcpy 수행 전 경계 검사가 누락되어 메모리 오염이 발생할 수 있습니다.
💡 쉬운 설명
조작된 NTFS 파일 시스템을 사용하면 컴퓨터 메모리의 정해진 범위를 벗어나 데이터를 쓰는 오류가 발생할 수 있습니다. 이로 인해 시스템이 멈추거나 보안이 취약해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ntfs: Fix index_root heap OOB write in ntfs_ir_to_ib()
ntfs_ir_to_ib copies all entries from index_root into a freshly allocated
index_block_size-byte buffer without verifying that the entries fit in the
available space. The entries in index_root may be larger than the usable
entry space in the index block.
This can cause OOB writes past the end of the allocation.
The validator ntfs_index_root_inconsistent() checks that entries are
self-consistent within the IR value, but never cross-checks them against
index_block_size. There is no bounds check in ntfs_ir_to_ib() before the
memcpy.
Fixing this at the sink in ntfs_ir_to_ib() since
ntfs_index_root_inconsistent() validates the logical consistency of
index_root as a structure and a root with large entries is a structurally
valid root. The bug is a size conflict of ntfs_ir_to_ib().
Also, the validator is called once per inode load in
ntfs_read_locked_inode() while ntfs_ir_to_ib() is only called during a
reparent, a check there adds no overhead to the common path.
Moreover, even a future call path that bypasses the validator would still
be protected.
With NULL as first parameter of ntfs_error(), the volume error flag is
never set by this call, so the device name will be absent from the error
message. In any case, that the caller, ntfs_ir_reparent(), prints an error
message that includes the device name on NULL returns.
I think this is the best solution available without adding
'struct super_block *sb' as a parameter to ntfs_ir_to_ib().
This heap out-of-bounds write is triggered by a crafted filesystem image,
which is not in the kernel threat model, anyway, fixing memory errors would
be nice to keep things secure.
📍 영향받는 시스템
Linux kernel (NTFS driver module)
⚔️ 공격 벡터
조작된 NTFS 파일 시스템 이미지를 마운트하여 트리거
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 버전인지 확인