🇰🇷 한글 설명
Linux 커널의 NILFS2 파일 시스템에서 GC(Garbage Collection) 과정 중 nilfs_mdt_save_to_shadow_map 함수가 초기화되지 않은 i_assoc_inode를 참조하여 발생하는 NULL 역참조 취약점입니다. DAT inode의 btree 노드 캐시가 지연 초기화되는 특성 때문에, btree 작업 없이 특정 IOCTL 호출이 발생할 경우 시스템 보호 오류(General Protection Fault)가 발생할 수 있습니다.
💡 쉬운 설명
파일 시스템의 특정 기능을 실행할 때, 아직 준비되지 않은 메모리 영역을 사용하려고 시도하여 컴퓨터 시스템이 갑자기 멈추거나 오류를 일으키는 문제입니다. 시스템이 데이터를 정리하는 과정에서 준비되지 않은 정보를 참조하여 발생하는 충돌입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix NULL i_assoc_inode dereference in nilfs_mdt_save_to_shadow_map
The DAT inode's btree node cache (i_assoc_inode) is initialized lazily
during btree operations. However, nilfs_mdt_save_to_shadow_map()
assumes i_assoc_inode is already initialized when copying dirty pages
to the shadow map during GC.
If NILFS_IOCTL_CLEAN_SEGMENTS is called immediately after mount before
any btree operation has occurred on the DAT inode, i_assoc_inode is
NULL leading to a general protection fault.
Fix this by calling nilfs_attach_btree_node_cache() on the DAT inode
in nilfs_dat_read() at mount time, ensuring i_assoc_inode is always
initialized before any GC operation can use it.
📍 영향받는 시스템
NILFS2 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 NILFS_IOCTL_CLEAN_SEGMENTS IOCTL 호출을 통해 시스템 오류 유발
🛡️ 대응 방법
커널 업데이트를 통해 nilfs_dat_read 시 btree 노드 캐시를 강제로 초기화하도록 패치 적용
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.