🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템 드라이버에서 log_replay() 함수가 DIR_PAGE_ENTRY_32 레코드를 변환할 때 발생하는 취약점입니다. 조작된 파일 시스템 이미지가 비정상적으로 큰 lcns_follow 값을 제공할 경우, memmove() 함수가 할당된 버퍼의 범위를 벗어나 메모리에 접근하는 경계 외(Out-of-bounds) 접근 문제가 발생할 수 있습니다.
💡 쉬운 설명
나쁜 의도로 만들어진 NTFS 저장 장치를 컴퓨터에 연결하면, 시스템이 데이터를 읽는 과정에서 메모리 범위를 넘어서는 잘못된 동작을 일으킬 수 있습니다. 이로 인해 시스템이 멈추거나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: validate lcns_follow in log_replay conversion
log_replay() converts DIR_PAGE_ENTRY_32 records into DIR_PAGE_ENTRY
records when replaying version 0 restart tables.
During this conversion, the memmove() length is derived directly from
the on-disk lcns_follow field:
memmove(&dp->vcn, &dp0->vcn_low,
2 * sizeof(u64) +
le32_to_cpu(dp->lcns_follow) * sizeof(u64));
check_rstbl() validates restart table structure, but does not constrain
per-entry lcns_follow values relative to the entry size. A malformed
filesystem image can provide an oversized lcns_follow value, causing
the conversion memmove() to access memory beyond the bounds of the
allocated restart table buffer.
The same field is later used to bound iteration over page_lcns[],
so validating lcns_follow during conversion also prevents downstream
out-of-bounds access from the same malformed metadata.
Compute the maximum valid lcns_follow from the already-validated
restart table entry size and reject entries that exceed this bound.
Reuse the existing t16/t32 scratch variables already declared in
log_replay() to avoid introducing new declarations.
[
[email protected]: fixed the conflicts]
📍 영향받는 시스템
Linux kernel (ntfs3 driver 사용 환경)
⚔️ 공격 벡터
조작된 메타데이터가 포함된 NTFS 파일 시스템 이미지(USB, 외장 하드 등)를 시스템에 마운트
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 최신 버전인지 확인합니다.