🇰🇷 한글 설명
Linux 커널의 UFS 파일 시스템에서 실린더 메타데이터를 로드하기 전에 루트 디렉터리(dentry)를 먼저 생성하여 발생하는 취약점입니다. 메타데이터 로드 중 오류가 발생하면 슈퍼블록 정보가 해제된 상태에서 루트 디렉터리가 남아 있어, 시스템 종료 과정에서 NULL 포인터 역참조로 인한 커널 패닉(Oops)이 발생할 수 있습니다.
💡 쉬운 설명
파일을 읽어오는 과정에서 오류가 났을 때, 컴퓨터가 뒷정리를 제대로 하지 못해 시스템이 멈추거나 오류를 일으키는 문제입니다. 악의적으로 조작된 파일을 연결하려고 하면 컴퓨터 시스템이 갑자기 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ufs: create the root dentry after loading cylinder metadata
ufs_fill_super() installed sb->s_root before it loaded the cylinder
group structures for a writable mount:
sb->s_root = d_make_root(inode);
...
if (!sb_rdonly(sb))
if (!ufs_read_cylinder_structures(sb))
goto failed;
When ufs_read_cylinder_structures() failed, the error path freed the
in-core superblock information and set sb->s_fs_info to NULL while
sb->s_root stayed installed. get_tree_bdev() then reached
deactivate_locked_super(), and because s_root was present,
generic_shutdown_super() called sync_filesystem() and the put_super
operation. Both dereference UFS_SB(sb), which is now NULL, so a mount
that fails only while reading the cylinder groups oopses during
teardown. A crafted image whose first cylinder group cannot be read
reaches this path.
Load the cylinder group metadata first and create the root dentry last,
so the superblock is published to the VFS only once it is fully set up.
ufs_setup_cstotal() and ufs_read_cylinder_structures() take only the
super_block and do not use the root inode, so the reordering is safe.
📍 영향받는 시스템
UFS 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
실린더 그룹 메타데이터를 읽을 수 없도록 조작된 특수 UFS 이미지 파일을 마운트 시도
🛡️ 대응 방법
실린더 그룹 메타데이터를 먼저 로드한 후 루트 디렉터리를 생성하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.