🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템 드라이버에서 log_replay() 분석 과정 중 배열 경계 검사 미흡으로 인한 취약점이 발견되었습니다. 악의적으로 조작된 LRH(Log Record Header)를 사용할 경우, 할당된 메모리 범위를 벗어나는 slab-out-of-bounds 쓰기 작업이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 NTFS 형식의 저장 장치를 읽을 때, 잘못된 정보를 가진 데이터가 들어오면 정해진 메모리 공간을 넘어서 데이터를 쓰는 오류가 발생합니다. 이로 인해 시스템이 멈추거나 보안 공격에 노출될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: bound copy_lcns dp->page_lcns[] index in analysis pass
In log_replay()'s analysis pass, after find_dp() returns a
valid DIR_PAGE_ENTRY for the (target_attr, target_vcn) tuple,
the copy_lcns block walks lrh->lcns_follow further entries:
t16 = le16_to_cpu(lrh->lcns_follow);
for (i = 0; i < t16; i++) {
size_t j = (size_t)(le64_to_cpu(lrh->target_vcn) -
le64_to_cpu(dp->vcn));
dp->page_lcns[j + i] = lrh->page_lcns[i];
}
find_dp() only validates that target_vcn falls within
[dp->vcn, dp->vcn + dp->lcns_follow), i.e., that the FIRST
cluster is covered. The walk through the further entries is
not bounded against dp->lcns_follow. For a malformed LRH
where target_vcn = dp->vcn + dp->lcns_follow - 1 and
lrh->lcns_follow > 1, the i > 0 writes overflow the dp's
allocated page_lcns[] array.
Add the missing j + lrh->lcns_follow <= dp->lcns_follow guard.
Reproduced under UML+KASAN on mainline 8d90b09e6741 as a
slab-out-of-bounds write of size 8 from log_replay+0x68d4 on
the mount path.
This is distinct from Pavitra Jha's 2026-05-02 patch
("fs/ntfs3: validate lcns_follow in log_replay conversion",
<
[email protected]>) which
addresses the separate version-0 dirty-page-table conversion
path's memmove(&dp->vcn, ...) call. The two fixes are
complementary; both should land.
[
[email protected]: clang-formatted the changes,
fixed conflicts]
📍 영향받는 시스템
Linux kernel (ntfs3 driver 사용 환경)
⚔️ 공격 벡터
조작된 NTFS 로그 레코드를 포함한 저장 매체를 마운트(Mount)하여 공격 수행
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인