🇰🇷 한글 설명
Linux 커널의 bdev 의사 파일시스템(pseudo-filesystem)을 사용자 공간에서 마운트할 수 있어 발생하는 취약점입니다. 사용자가 이 파일시스템에 접근하려고 시할 경우, 커널이 NULL 포인터를 참조하여 시스템이 충돌하거나 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
시스템 내부에서만 사용해야 하는 특수 폴더를 일반 사용자가 강제로 열려고 시도할 때 발생합니다. 이 과정에서 컴퓨터의 핵심 엔진(커널)이 잘못된 주소를 참조하여 시스템이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
block: Avoid mounting the bdev pseudo-filesystem in userspace
The bdev pseudo-filesystem is an internal kernel filesystem with which
userspace should not interfere. Unregister it so that userspace cannot
even attempt to mount it.
This fixes a bug [1] that occurs when attempting to access files,
because the system call move_mount() uses pointers declared in the
inode_operations structure, which for the bdev pseudo-filesystem
are always equal to 0. `inode->i_op = &empty_iops;`
[1]
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 23380067 P4D 23380067 PUD 23381067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN NOPTI
CPU: 2 PID: 17125 Comm: syz-executor.0 Not tainted 6.1.155-syzkaller-00350-g84221fde2681 #0
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
RIP: 0010:0x0
Call Trace:
<TASK>
lookup_open.isra.0+0x700/0x1180 fs/namei.c:3460
open_last_lookups fs/namei.c:3550 [inline]
path_openat+0x953/0x2700 fs/namei.c:3780
do_filp_open+0x1c5/0x410 fs/namei.c:3810
do_sys_openat2+0x171/0x4d0 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x13c/0x1f0 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x6e/0xd8
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
📍 영향받는 시스템
Linux kernel (v6.1.155 미만 버전 등 bdev 마운트가 가능한 커널)
⚔️ 공격 벡터
사용자 권한으로 bdev 의사 파일시스템을 마운트하거나 해당 파일시스템 내의 파일에 접근을 시도하는 방식
🛡️ 대응 방법
bdev 의사 파일시스템을 사용자 공간에서 마운트할 수 없도록 커널을 업데이트하거나 패치 적용
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.