🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템에서 압축되거나 희소(sparse) 속성을 처리할 때 vcn0의 런(run)을 로드하지 못하는 취약점이 발견되었습니다. 이로 인해 특정 조건에서 vcn0가 메모리 내 런 리스트에 포함되지 않아 시스템 경고(WARN_ON)가 발생할 수 있습니다.
💡 쉬운 설명
리눅스에서 NTFS 형식의 파일을 읽을 때, 데이터의 위치를 찾는 과정에서 계산 오류로 인해 시스템이 혼란을 겪는 문제입니다. 이로 인해 시스템에 경고 메시지가 뜨거나 예기치 않은 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: fix missing run load for vcn0 in attr_data_get_block_locked()
When a compressed or sparse attribute has its clusters frame-aligned,
vcn is rounded down to the frame start using cmask, which can result
in vcn != vcn0. In this case, vcn and vcn0 may reside in different
attribute segments.
The code already handles the case where vcn is in a different segment
by loading its runs before allocation. However, it fails to load runs
for vcn0 when vcn0 resides in a different segment than vcn. This causes
run_lookup_entry() to return SPARSE_LCN for vcn0 since its segment was
never loaded into the in-memory run list, triggering the WARN_ON(1).
Fix this by adding a missing check for vcn0 after the existing vcn
segment check. If vcn0 falls outside the current segment range
[svcn, evcn1), find and load the attribute segment containing vcn0
before performing the run lookup.
The following scenario triggers the bug:
attr_data_get_block_locked()
vcn = vcn0 & cmask <- vcn != vcn0 after frame alignment
load runs for vcn segment <- vcn0 segment not loaded!
attr_allocate_clusters() <- allocation succeeds
run_lookup_entry(vcn0) <- vcn0 not in run -> SPARSE_LCN
WARN_ON(1) <- bug fires here!
📍 영향받는 시스템
Linux kernel (ntfs3 driver 사용 환경)
⚔️ 공격 벡터
특수하게 조작된 NTFS 파일 시스템의 압축 또는 희소 속성을 마운트하거나 읽을 때 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인