🔍 CVE-2025-40138

0.0
CVSS Score
UNKNOWN
2025-11-12
2026-10-19 21:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 F2FS 파일 시스템에서 f2fs_check_quota_consistency() 함수 호출 시 NULL 포인터 역참조가 발생할 수 있는 취약점입니다. 이로 인해 시스템이 충돌하거나 일반 보호 오류(General Protection Fault)가 발생할 수 있습니다.

💡 쉬운 설명

파일 시스템의 할당량(Quota)을 확인하는 과정에서 컴퓨터가 존재하지 않는 메모리 주소를 참조하여 시스템이 멈추거나 오류가 발생하는 문제입니다. 특정 방식으로 디스크를 다시 마운트할 때 발생할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency() syzbot reported a f2fs bug as below: Oops: gen[ 107.736417][ T5848] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 UID: 0 PID: 5848 Comm: syz-executor263 Tainted: G W 6.17.0-rc1-syzkaller-00014-g0e39a731820a #0 PREEMPT_{RT,(full)} RIP: 0010:strcmp+0x3c/0xc0 lib/string.c:284 Call Trace: <TASK> f2fs_check_quota_consistency fs/f2fs/super.c:1188 [inline] f2fs_check_opt_consistency+0x1378/0x2c10 fs/f2fs/super.c:1436 __f2fs_remount fs/f2fs/super.c:2653 [inline] f2fs_reconfigure+0x482/0x1770 fs/f2fs/super.c:5297 reconfigure_super+0x224/0x890 fs/super.c:1077 do_remount fs/namespace.c:3314 [inline] path_mount+0xd18/0xfe0 fs/namespace.c:4112 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4321 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The direct reason is f2fs_check_quota_consistency() may suffer null-ptr-deref issue in strcmp(). The bug can be reproduced w/ below scripts: mkfs.f2fs -f /dev/vdb mount -t f2fs -o usrquota /dev/vdb /mnt/f2fs quotacheck -uc /mnt/f2fs/ umount /mnt/f2fs mount -t f2fs -o usrjquota=aquota.user,jqfmt=vfsold /dev/vdb /mnt/f2fs mount -t f2fs -o remount,usrjquota=,jqfmt=vfsold /dev/vdb /mnt/f2fs umount /mnt/f2fs So, before old_qname and new_qname comparison, we need to check whether they are all valid pointers, fix it.

📍 영향받는 시스템

Linux kernel (F2FS 파일 시스템을 사용하는 환경)

⚔️ 공격 벡터

조작된 F2FS 파일 시스템을 마운트하거나 특정 옵션(usrjquota 등)을 사용하여 remount를 수행할 때 발생

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인하십시오.

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel