🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템 드라이버에서 journal-replay 과정 중 파일 레코드의 사용량(rec->used)을 적절히 검증하지 않아 발생하는 취약점입니다. 잘못된 사용량 값이 입력될 경우 산술 연산 언더플로우가 발생하여 4KB 버퍼에 과도한 양의 메모리를 복사하는 메모리 오염 문제가 발생할 수 있습니다.
💡 쉬운 설명
파일 시스템의 기록을 복구하는 과정에서 데이터 크기를 잘못 계산하여 컴퓨터 메모리의 허용된 범위를 넘어가는 데이터를 복사하는 오류입니다. 손상된 저장 장치를 연결할 때 시스템의 보안이 취약해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: validate rec->used in journal-replay file record check
check_file_record() validates rec->total against the record size but
never validates rec->used. The do_action() journal-replay handlers read
rec->used from disk and use it to compute memmove lengths:
DeleteAttribute: memmove(attr, ..., used - asize - roff)
CreateAttribute: memmove(..., attr, used - roff)
change_attr_size: memmove(..., used - PtrOffset(rec, next))
When rec->used is smaller than the offset of a validated attribute, or
larger than the record size, these subtractions can underflow allowing
us to copy huge amounts of memory in to a 4kb buffer, generally
considered a bad idea overall.
This requires a corrupted filesystem, which isn't a threat model the
kernel really needs to worry about, but checking for such an obvious
out-of-bounds value is good to keep things robust, especially on journal
replay
Fix this up by bounding rec->used correctly.
This is much like commit b2bc7c44ed17 ("fs/ntfs3: Fix slab-out-of-bounds
read in DeleteIndexEntryRoot") which checked different values in this
same switch statement.
📍 영향받는 시스템
Linux kernel (ntfs3 driver 사용 환경)
⚔️ 공격 벡터
조작되거나 손상된 NTFS 파일 시스템을 마운트하여 journal-replay를 유도함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 rec->used 값에 대한 경계 검증 로직을 적용함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.