🇰🇷 한글 설명
Linux 커널의 Squashfs 파일 시스템에서 squashfs_get_parent 함수 호출 시 초기화되지 않은 값을 참조하는 취약점이 발견되었습니다. 이는 심볼릭 링크와 같이 부모 디렉토리가 없는 inode 번호가 전달될 때 발생하며, 부모 inode 필드가 초기화되지 않아 발생합니다.
💡 쉬운 설명
파일 시스템의 특정 정보를 읽을 때, 컴퓨터가 아직 정해지지 않은 잘못된 값을 읽으려고 시도하여 오류가 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Squashfs: fix uninit-value in squashfs_get_parent
Syzkaller reports a "KMSAN: uninit-value in squashfs_get_parent" bug.
This is caused by open_by_handle_at() being called with a file handle
containing an invalid parent inode number. In particular the inode number
is that of a symbolic link, rather than a directory.
Squashfs_get_parent() gets called with that symbolic link inode, and
accesses the parent member field.
unsigned int parent_ino = squashfs_i(inode)->parent;
Because non-directory inodes in Squashfs do not have a parent value, this
is uninitialised, and this causes an uninitialised value access.
The fix is to initialise parent with the invalid inode 0, which will cause
an EINVAL error to be returned.
Regular inodes used to share the parent field with the block_list_start
field. This is removed in this commit to enable the parent field to
contain the invalid inode number 0.
📍 영향받는 시스템
Squashfs 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
잘못된 부모 inode 번호를 포함한 파일 핸들을 open_by_handle_at() 함수로 전달하여 유도
🛡️ 대응 방법
Squashfs의 parent 필드를 0으로 초기화하여 유효하지 않은 inode 접근 시 EINVAL 에러를 반환하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 보안 패치 버전인지 확인합니다.