🇰🇷 한글 설명
Linux 커널의 Squashfs 파일시스템에서 inode 번호 검증 부재로 인한 메모리 접근 오류 발생. fill_meta_index() 함수가 0으로 표시된 무효한 inode를 재사용하면서 out of bounds 접근이 발생하는 문제.
💡 쉬운 설명
Linux 저장장치 관리 코드에서 잘못된 값(0)을 가진 파일 정보를 다시 사용하면서 메모리 보호 경계를 벗어난 접근이 발생합니다. 이로 인해 시스템 충돌이나 권한 상승이 가능합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Squashfs: check the inode number is not the invalid value of zero
Syskiller has produced an out of bounds access in fill_meta_index().
That out of bounds access is ultimately caused because the inode
has an inode number with the invalid value of zero, which was not checked.
The reason this causes the out of bounds access is due to following
sequence of events:
1. Fill_meta_index() is called to allocate (via empty_meta_index())
and fill a metadata index. It however suffers a data read error
and aborts, invalidating the newly returned empty metadata index.
It does this by setting the inode number of the index to zero,
which means unused (zero is not a valid inode number).
2. When fill_meta_index() is subsequently called again on another
read operation, locate_meta_index() returns the previous index
because it matches the inode number of 0. Because this index
has been returned it is expected to have been filled, and because
it hasn't been, an out of bounds access is performed.
This patch adds a sanity check which checks that the inode number
is not zero when the inode is created and returns -EINVAL if it is.
[
[email protected]: whitespace fix]
📍 영향받는 시스템
Linux 커널 5.15 이상 (Squashfs 파일시스템 사용 환경)
⚔️ 공격 벡터
Squashfs 파일시스템으로 마운트된 악의적 또는 손상된 이미지 파일 접근
🛡️ 대응 방법
Linux 커널을 패치된 버전으로 업데이트 (5.15.156, 6.1.93, 6.6.33, 6.7.21, 6.8.12 이상)
🔧 검증 코드
명령어가 'vulnerable'을 출력하면 해당 커널 버전이 취약점에 노출되어 있으며, 'patched'를 출력하면 안전한 버전입니다.
uname -r | awk -F. '{if ($1==5 && $2==15 && $3<156) print "vulnerable"; else if ($1==6 && $2==1 && $3<93) print "vulnerable"; else if ($1==6 && $2==6 && $3<33) print "vulnerable"; else print "patched"}'