🇰🇷 한글 설명
Linux 커널의 OCFS2 파일 시스템에서 발생한 취약점으로, 디스크 상의 데이터가 손상되어 특정 값이 0으로 설정될 경우 배열 인덱스 범위를 벗어나는 문제가 발생합니다. 이로 인해 시스템이 UBSAN 패닉을 일으키며 중단될 수 있습니다.
💡 쉬운 설명
파일 저장 방식에 오류가 생겼을 때 컴퓨터가 잘못된 위치를 참조하여 시스템이 멈춰버리는 버그입니다. 데이터가 깨진 상태에서 파일을 쓰려고 하면 컴퓨터가 당황하여 작동을 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec
[BUG]
On-disk corruption setting l_next_free_rec to 0 in an inode's embedded
extent list triggers a UBSAN panic on the next write to that file.
[CAUSE]
ocfs2_sum_rightmost_rec() computes
i = le16_to_cpu(el->l_next_free_rec) - 1
and accesses el->l_recs[i] without validating i. When l_next_free_rec
is 0, i becomes -1; when l_next_free_rec exceeds l_count, i falls
past the end of the array. Either case violates the
__counted_by_le(l_count) annotation on l_recs[] and triggers UBSAN.
[FIX]
Validate the inode's embedded extent list when the inode is read, in
ocfs2_validate_inode_block(): l_count must be non-zero and no larger
than the inode block can hold, and l_next_free_rec must not exceed
l_count. A corrupt list is rejected at read time, before the b-tree
code can index l_recs[] out of bounds.
📍 영향받는 시스템
Linux kernel (OCFS2 파일 시스템 사용 환경)
⚔️ 공격 벡터
디스크 내 인덱스 정보(l_next_free_rec)를 0 또는 잘못된 값으로 조작하여 시스템 패닉 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 데이터 검증 로직 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인