🇰🇷 한글 설명
Linux 커널의 NILFS2 파일 시스템에서 nilfs_copy_dirty_pages() 함수 호출 시 dirty 상태 불일치로 인해 커널 BUG가 발생하는 취약점입니다. 파일 시스템이 읽기 전용 모드로 전환된 후 비동기적으로 dirty 플래그가 해제될 때 발생하며, 이를 해결하기 위해 읽기 전용 상태 확인 및 경고 로직이 수정되었습니다.
💡 쉬운 설명
파일 시스템에 오류가 생겨 읽기 전용으로 바뀔 때, 시스템이 데이터 상태를 잘못 판단하여 컴퓨터가 멈추거나 오류를 일으킬 수 있는 문제입니다. 이번 수정으로 시스템이 갑자기 멈추는 대신 안전하게 오류를 알리도록 개선되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix BUG in nilfs_copy_dirty_pages() on dirty state mismatch
Syzbot reported a kernel BUG triggered within nilfs_copy_dirty_pages(),
which copies dirty DAT file folios/pages to its shadow page cache. The
BUG occurs when a retrieved dirty folio/page unexpectedly loses its
'dirty' status.
This issue arises because, since the commit referenced below, the 'dirty'
flag of a folio/page can be cleared asynchronously after the filesystem
detects metadata corruption and transitions to read-only mode.
Resolve the issue by returning an -EROFS error if the filesystem has
transitioned to read-only mode. Also change the behavior to issue a
kernel warning only once instead of triggering a kernel BUG when this
unexpected 'dirty' state is detected while the filesystem is not in
read-only mode.
📍 영향받는 시스템
Linux Kernel (NILFS2 파일 시스템을 사용하는 버전)
⚔️ 공격 벡터
로컬 공격자가 파일 시스템의 메타데이터 손상을 유도하여 커널 BUG를 트리거할 수 있음
🛡️ 대응 방법
NILFS2 관련 커널 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 NILFS2 관련 수정 사항이 포함된 최신 패치 버전인지 확인