🇰🇷 한글 설명
Linux 커널의 f2fs 파일 시스템에서 f2fs.ko 모듈 설치와 파일 시스템 마운트가 동시에 발생할 때 null 포인터 역참조(null-ptr-deref)가 발생하는 취약점입니다. f2fs_fs_type 등록 전에 파일 시스템 비셋(biset)이 초기화되지 않아 발생하며, 이로 인해 시스템 충돌이나 커널 패닉이 유발될 수 있습니다.
💡 쉬운 설명
컴퓨터가 파일을 저장하는 방식(f2fs)을 준비하는 과정에서 순서가 잘못되어 발생하는 오류입니다. 준비가 덜 된 상태에서 파일을 읽으려고 시도하면 시스템이 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix null-ptr-deref in f2fs_submit_page_bio()
There's issue as follows when concurrently installing the f2fs.ko
module and mounting the f2fs file system:
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
RIP: 0010:__bio_alloc+0x2fb/0x6c0 [f2fs]
Call Trace:
<TASK>
f2fs_submit_page_bio+0x126/0x8b0 [f2fs]
__get_meta_page+0x1d4/0x920 [f2fs]
get_checkpoint_version.constprop.0+0x2b/0x3c0 [f2fs]
validate_checkpoint+0xac/0x290 [f2fs]
f2fs_get_valid_checkpoint+0x207/0x950 [f2fs]
f2fs_fill_super+0x1007/0x39b0 [f2fs]
mount_bdev+0x183/0x250
legacy_get_tree+0xf4/0x1e0
vfs_get_tree+0x88/0x340
do_new_mount+0x283/0x5e0
path_mount+0x2b2/0x15b0
__x64_sys_mount+0x1fe/0x270
do_syscall_64+0x5f/0x170
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Above issue happens as the biset of the f2fs file system is not
initialized before register "f2fs_fs_type".
To address above issue just register "f2fs_fs_type" at the last in
init_f2fs_fs(). Ensure that all f2fs file system resources are
initialized.
📍 영향받는 시스템
f2fs 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 공격자가 f2fs 모듈 설치와 마운트 작업을 동시에 수행하여 커널 오류 유도
🛡️ 대응 방법
커널 패치가 적용된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.