🇰🇷 한글 설명
Linux 커널의 hfs/hfsplus 파일 시스템에서 check_and_correct_requested_length 함수 내 u32 산술 연산 시 오버플로가 발생합니다. 매우 큰 길이 값이 전달될 경우 오프셋과 길이의 합이 2^32를 초과하여 작은 값으로 계산되면서 경계 검사를 우회하게 됩니다.
💡 쉬운 설명
파일의 크기를 계산하는 과정에서 숫자가 너무 커져서 계산 오류가 발생하는 문제입니다. 이 오류를 이용하면 시스템이 허용되지 않은 메모리 영역에 접근하여 정보를 읽거나 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hfs/hfsplus: fix u32 overflow in check_and_correct_requested_length
check_and_correct_requested_length() compares (off + len) against
node_size using u32 arithmetic. When the caller passes a large len
value (e.g. from an underflowed subtraction in hfs_brec_remove()),
off + len can wrap past 2^32 and produce a small result, causing the
bounds check to pass when it should fail.
For example, with off=14 and len=0xFFFFFFF2 (underflowed from
data_off - keyoffset - size in hfs_brec_remove), off + len wraps to 6,
which is less than a typical node_size of 512, so the check passes and
the subsequent memmove reads ~4GB past the node buffer.
Fix this by widening the addition to u64 before comparing against
node_size. This prevents the u32 wrap while keeping the logic
straightforward.
📍 영향받는 시스템
hfs/hfsplus 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 hfs/hfsplus 파일 시스템 이미지를 마운트하여 메모리 범위를 벗어난 읽기 시도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 u64 연산이 적용된 수정본을 적용하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.