🇰🇷 한글 설명
Linux 커널의 OCFS2 파일 시스템에서 refcount 트리의 마지막 리프 블록을 제거할 때 발생하는 경계 외 쓰기(Out-of-bounds write) 취약점입니다. 트리가 리프 모드로 전환되는 과정에서 잘못된 크기의 memset이 수행되어 메모리 오염을 유발하며, 이는 fortify panic을 일으킵니다.
💡 쉬운 설명
파일을 삭제하는 과정에서 컴퓨터 메모리의 정해진 범위를 벗어나 데이터를 쓰는 오류가 발생합니다. 이로 인해 시스템이 갑자기 멈추거나 오류를 일으키며 강제 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix out-of-bounds write in ocfs2_remove_refcount_extent
[BUG]
Unlinking a refcounted file whose refcount tree has leaf blocks
triggers a fortify panic due to an out-of-bounds write.
[CAUSE]
When the last leaf block is removed from a refcount tree,
ocfs2_remove_refcount_extent() converts the root back to leaf mode
with a bulk memset on &rb->rf_records. rf_records sits in an anonymous
union with rf_list. rf_list.l_tree_depth aliases rf_records.rl_count,
and is 0 for a single-level tree. With rl_count equal to 0, the memset
writes past the 16-byte declared size of rf_records, which the fortify
checker catches.
[FIX]
Replace the bulk memset on &rb->rf_records with a correctly-bounded
memset on rl_recs[] alone, after setting rl_count to the correct value.
📍 영향받는 시스템
Linux kernel (OCFS2 파일 시스템을 사용하는 시스템)
⚔️ 공격 벡터
참조 횟수가 관리되는 파일을 언링크(Unlink)하는 동작을 통해 트리 구조를 조작하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ocfs2_remove_refcount_extent 함수를 수정해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전 이상인지 확인합니다.