🇰🇷 한글 설명
Linux 커널의 Minix 파일 시스템에서 비트맵 블록 수 계산 시 정수 오버플로가 발생할 수 있는 취약점입니다. 공격자가 조작된 Minix v3 이미지를 마운트할 경우, 잘못된 계산으로 인해 할당되지 않은 메모리 주소를 참조하게 되어 커널 패닉(시스템 중단)이 발생합니다.
💡 쉬운 설명
특수하게 제작된 가짜 저장 장치 파일을 컴퓨터에 연결하면, 컴퓨터가 이를 읽는 과정에서 계산 오류를 일으켜 시스템이 갑자기 멈춰버릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
minix: avoid overflow in bitmap block count calculation
minix_check_superblock() uses minix_blocks_needed() to verify that the
on-disk imap and zmap block counts are large enough for the advertised
inode and zone counts.
The helper currently performs DIV_ROUND_UP() in unsigned int arithmetic.
A Minix v3 image can set s_ninodes or s_zones near UINT_MAX so the
addition inside DIV_ROUND_UP() wraps to zero. That makes a zero imap/zmap
block count look valid, after which minix_fill_super() can dereference
s_imap[0] or s_zmap[0] even though no bitmap buffers were allocated.
Impact: mounting a crafted Minix v3 image whose s_ninodes or s_zones is
near UINT_MAX makes minix_check_superblock() accept a zero bitmap-block
count and minix_fill_super() dereference s_imap[0]/s_zmap[0], panicking
the kernel.
The divisor is the bitmap capacity in bits, blocksize * 8, which is
always a power of two: minix_fill_super() obtains the block size through
sb_set_blocksize(), and blk_validate_block_size() rejects any size that
is not a power of two. Use DIV_ROUND_UP_POW2(), which divides before
adding the round-up term and so cannot overflow for a power-of-two
divisor.
📍 영향받는 시스템
Minix 파일 시스템을 지원하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 s_ninodes 또는 s_zones 값을 가진 Minix v3 이미지 마운트
🛡️ 대응 방법
DIV_ROUND_UP_POW2()를 사용하여 오버플로를 방지하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 보안 패치 버전인지 확인하십시오.