🇰🇷 한글 설명
Linux 커널의 OCFS2 파일 시스템에서 ocfs2_group_extend 함수가 유효하지 않은 dinode를 처리하지 못해 발생하는 취약점입니다. 조작된 파일 시스템을 통해 잘못된 데이터가 전달될 경우 커널 BUG가 발생하며 시스템이 충돌할 수 있습니다.
💡 쉬운 설명
파일 시스템의 크기를 조절하는 과정에서 잘못된 데이터가 들어오면 컴퓨터의 핵심인 커널이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 공격자가 특수하게 만든 파일을 사용하면 시스템을 강제로 중단시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: handle invalid dinode in ocfs2_group_extend
[BUG]
kernel BUG at fs/ocfs2/resize.c:308!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
RIP: 0010:ocfs2_group_extend+0x10aa/0x1ae0 fs/ocfs2/resize.c:308
Code: 8b8520ff ffff83f8 860f8580 030000e8 5cc3c1fe
Call Trace:
...
ocfs2_ioctl+0x175/0x6e0 fs/ocfs2/ioctl.c:869
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x197/0x1e0 fs/ioctl.c:583
x64_sys_call+0x1144/0x26a0 arch/x86/include/generated/asm/syscalls_64.h:17
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x93/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x76/0x7e
...
[CAUSE]
ocfs2_group_extend() assumes that the global bitmap inode block
returned from ocfs2_inode_lock() has already been validated and
BUG_ONs when the signature is not a dinode. That assumption is too
strong for crafted filesystems because the JBD2-managed buffer path
can bypass structural validation and return an invalid dinode to the
resize ioctl.
[FIX]
Validate the dinode explicitly in ocfs2_group_extend(). If the global
bitmap buffer does not contain a valid dinode, report filesystem
corruption with ocfs2_error() and fail the resize operation instead of
crashing the kernel.
📍 영향받는 시스템
Linux kernel (OCFS2 파일 시스템을 사용하는 시스템)
⚔️ 공격 벡터
조작된 구조를 가진 OCFS2 파일 시스템을 마운트하거나 관련 ioctl 명령을 실행하여 커널 패닉 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 dinode 유효성 검사 로직을 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.