🇰🇷 한글 설명
Linux kernel의 Squashfs 파일시스템에서 심볼릭 링크 크기 검증 부재로 인한 취약점입니다. 손상된 심볼릭 링크 크기 값이 정수 오버플로우를 발생시켜 초기화되지 않은 메모리 페이지를 생성합니다. 커널 메모리 정보 유출과 시스템 불안정을 야기할 수 있습니다.
💡 쉬운 설명
Linux에서 파일 바로가기(심볼릭 링크) 크기 값을 제대로 확인하지 않아 수정된 값으로 인해 컴퓨터 메모리가 제대로 초기화되지 않는 문제입니다. 이는 민감한 정보 노출이나 시스템 충돌을 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Squashfs: sanity check symbolic link size
Syzkiller reports a "KMSAN: uninit-value in pick_link" bug.
This is caused by an uninitialised page, which is ultimately caused
by a corrupted symbolic link size read from disk.
The reason why the corrupted symlink size causes an uninitialised
page is due to the following sequence of events:
1. squashfs_read_inode() is called to read the symbolic
link from disk. This assigns the corrupted value
3875536935 to inode->i_size.
2. Later squashfs_symlink_read_folio() is called, which assigns
this corrupted value to the length variable, which being a
signed int, overflows producing a negative number.
3. The following loop that fills in the page contents checks that
the copied bytes is less than length, which being negative means
the loop is skipped, producing an uninitialised page.
This patch adds a sanity check which checks that the symbolic
link size is not larger than expected.
--
V2: fix spelling mistake.
📍 영향받는 시스템
Linux kernel 모든 버전 (Squashfs 파일시스템 지원 시스템)
⚔️ 공격 벡터
악의적으로 조작된 Squashfs 이미지 파일을 통해 손상된 심볼릭 링크 크기를 주입하여 트리거
🛡️ 대응 방법
Linux kernel을 CVE-2024-46744 패치가 적용된 버전으로 업그레이드하거나 해당 패치 적용
🔧 검증 코드
설치된 linux-image 커널 버전을 확인한 후, CVE 공지사항의 패치 적용 버전 이상인지 확인하세요. Squashfs 지원 여부는 'grep squashfs /proc/filesystems'로 확인 가능합니다.
dpkg -l 2>/dev/null | grep linux-image | awk '{print $2,$3}' | head -1 || uname -r