🇰🇷 한글 설명
Linux 커널의 OCFS2 파일 시스템에서 메타데이터를 읽을 때 외부 xattr(확장 속성) 항목을 제대로 검증하지 않는 취약점입니다. 이로 인해 잘못된 xh_count나 엔트리 오프셋이 허용되어 메모리 범위 밖을 참조하는 Use-After-Free 오류가 발생할 수 있습니다.
💡 쉬운 설명
파일의 추가 정보를 저장하는 공간에서 데이터의 크기가 실제 공간보다 큰지 확인하지 않아 발생하는 문제입니다. 공격자가 조작된 데이터를 사용하면 컴퓨터 메모리 오류를 일으켜 시스템을 중단시키거나 보안을 위협할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: validate external xattr entries when reading metadata
ocfs2_validate_xattr_block() checks the xattr block header before the
block reaches higher-level xattr users, but it does not verify that a
non-indexed block's xh_count and entry offsets fit inside the block.
Indexed buckets likewise reach list/get consumers after ECC without an
entry-bounds check.
Use the flat xattr entry validator for non-indexed external xattr blocks,
and use a bucket-specific validator for indexed buckets at metadata read
time. The bucket validator keeps the entry array bounded by the first
bucket block while checking name/value offsets against the bucket block
they target.
Reject corrupted external xattr metadata before listxattr() or getxattr()
can walk out-of-range entry arrays or name/value offsets.
Validation reproduced this kernel report:
BUG: KASAN: use-after-free in ocfs2_xattr_list_entries+0xd7/0x190
Read of size 1 at addr ffff88810a654007 by task ocfs2_xattr_lis/630
Call Trace:
dump_stack_lvl+0x66/0xa0
print_report+0xce/0x630
kasan_report+0xe0/0x110
ocfs2_xattr_list_entries+0xd7/0x190
ocfs2_listxattr+0x3f6/0x610
listxattr+0x90/0xe0
path_listxattrat+0xed/0x220
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
📍 영향받는 시스템
OCFS2 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 메타데이터를 포함한 OCFS2 파일 시스템의 확장 속성(xattr)을 읽도록 유도
🛡️ 대응 방법
OCFS2 xattr 검증 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인