🇰🇷 한글 설명
Linux 커널의 OCFS2 파일 시스템에서 조작된 이미지를 마운트할 때 유효하지 않은 저널 dinode로 인해 커널 패닉(BUG_ON)이 발생할 수 있는 취약점입니다. 기존에는 마운트 실패로 처리되던 오류가 특정 커밋 이후 커널 크래시를 유발하도록 변경되었습니다. 이를 해결하기 위해 BUG_ON()을 WARN_ON()으로 교체하고 -EIO 에러를 반환하도록 수정되었습니다.
💡 쉬운 설명
악의적으로 조작된 파일 시스템 파일을 컴퓨터에 연결하려고 하면 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 시스템이 오류를 안전하게 처리하지 못하고 즉시 중단되는 현상을 방지하기 위한 패치가 적용되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: don't BUG_ON an invalid journal dinode
[BUG]
A fuzzed OCFS2 image can corrupt the current slot journal dinode while
mount is still in progress. The mount path first reports the invalid
journal block and then crashes in shutdown:
kernel BUG at fs/ocfs2/journal.c:1034!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
RIP: 0010:ocfs2_journal_toggle_dirty+0x2d6/0x340 fs/ocfs2/journal.c:1034
Call Trace:
ocfs2_journal_shutdown+0x414/0xc30 fs/ocfs2/journal.c:1116
ocfs2_mount_volume fs/ocfs2/super.c:1785 [inline]
ocfs2_fill_super+0x30a9/0x3cd0 fs/ocfs2/super.c:1083
get_tree_bdev_flags+0x38b/0x640 fs/super.c:1698
get_tree_bdev+0x24/0x40 fs/super.c:1721
ocfs2_get_tree+0x21/0x30 fs/ocfs2/super.c:1184
vfs_get_tree+0x9a/0x370 fs/super.c:1758
fc_mount fs/namespace.c:1199 [inline]
do_new_mount_fc fs/namespace.c:3642 [inline]
do_new_mount fs/namespace.c:3718 [inline]
path_mount+0x5b8/0x1ea0 fs/namespace.c:4028
do_mount fs/namespace.c:4041 [inline]
__do_sys_mount fs/namespace.c:4229 [inline]
__se_sys_mount fs/namespace.c:4206 [inline]
__x64_sys_mount+0x282/0x320 fs/namespace.c:4206
...
[CAUSE]
ocfs2_journal_toggle_dirty() used to return -EIO when journal->j_bh no
longer contained a valid dinode, because the startup and shutdown paths
already handled that failure. Commit 10995aa2451a
("ocfs2: Morph the haphazard OCFS2_IS_VALID_DINODE() checks.") changed
the check to a BUG_ON() under the assumption that the journal dinode had
already been validated. That turns an unexpected invalid journal dinode
during mount teardown into a kernel crash instead of a normal mount
failure.
[FIX]
Replace the BUG_ON() with WARN_ON() and return -EIO. This keeps the
invariant warning for debugging, but restores the original behavior of
failing startup or shutdown cleanly instead of panicking the kernel.
📍 영향받는 시스템
Linux kernel (OCFS2 파일 시스템을 사용하는 시스템)
⚔️ 공격 벡터
조작된(fuzzed) OCFS2 이미지 파일을 시스템에 마운트 시도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.