🇰🇷 한글 설명
Linux 커널의 exfat 파일 시스템에서 공유 쓰기 매핑의 valid_size가 확장될 때 레이스 컨디션이 발생할 수 있는 취약점입니다. 데이터 쓰기 작업과 페이지 캐시를 0으로 채우는 작업이 동시에 발생할 경우, 사용자가 저장한 데이터가 0으로 덮어씌워질 수 있습니다.
💡 쉬운 설명
파일을 저장하는 과정에서 시스템의 처리 순서가 꼬여 사용자가 방금 저장한 데이터가 사라지고 빈 값(0)으로 바뀌어 버릴 수 있는 문제입니다. 이는 데이터의 무결성을 해칠 수 있는 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
exfat: fix valid_size extension over a shared writable mapping
When a shared writable mapping has its valid_size extended by a buffered
write or a page fault, exfat zeroes the page-cache gap below the new
valid_size. A store through the mapping can race with this zeroing and be
overwritten.
Fix this by zeroing the gap lazily. Drop ->map_pages so that every first
write fault goes through exfat_page_mkwrite(), which advances valid_size to
cover the faulting page. With fault-around enabled, a store could install a
writable PTE, skip ->page_mkwrite(), and land past valid_size without
advancing it. Extending valid_size one faulting page at a time also leaves
never-written pages in a large mapping alone.
The gap is filled with block granularity, zeroing only the not-uptodate
blocks and preserving blocks that may hold data stored through the mapping.
On the buffered-write path the invalidate lock is held and the gap is
unmapped before zeroing, so a racing store re-faults and, under the inode
lock, completes only after the gap has been zeroed and valid_size covers
it.
📍 영향받는 시스템
exfat 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
공유 쓰기 매핑을 통한 버퍼드 쓰기 또는 페이지 폴트 유발을 통한 레이스 컨디션 공격
🛡️ 대응 방법
exfat 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인합니다.