🇰🇷 한글 설명
Linux 커널의 ext4 파일 시스템에서 fast-commit 기능이 활성화된 경우, 저널 복구(replay) 과정 중 초기화되지 않은 락(lock)에 접근하는 취약점이 발견되었습니다. 이로 인해 커널의 잠금 검증 도구(lockdep)에서 오류가 발생하거나 시스템 불안정을 초래할 수 있습니다.
💡 쉬운 설명
파일 시스템을 복구하는 과정에서 아직 준비되지 않은 '잠금 장치'를 사용하려고 시도하여 발생하는 문제입니다. 이로 인해 컴퓨터 시스템이 예기치 않게 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix access to uninitialised lock in fc replay path
The following kernel trace can be triggered with fstest generic/629 when
executed against a filesystem with fast-commit feature enabled:
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 PID: 866 Comm: mount Not tainted 6.10.0+ #11
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-prebuilt.qemu.org 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0x66/0x90
register_lock_class+0x759/0x7d0
__lock_acquire+0x85/0x2630
? __find_get_block+0xb4/0x380
lock_acquire+0xd1/0x2d0
? __ext4_journal_get_write_access+0xd5/0x160
_raw_spin_lock+0x33/0x40
? __ext4_journal_get_write_access+0xd5/0x160
__ext4_journal_get_write_access+0xd5/0x160
ext4_reserve_inode_write+0x61/0xb0
__ext4_mark_inode_dirty+0x79/0x270
? ext4_ext_replay_set_iblocks+0x2f8/0x450
ext4_ext_replay_set_iblocks+0x330/0x450
ext4_fc_replay+0x14c8/0x1540
? jread+0x88/0x2e0
? rcu_is_watching+0x11/0x40
do_one_pass+0x447/0xd00
jbd2_journal_recover+0x139/0x1b0
jbd2_journal_load+0x96/0x390
ext4_load_and_init_journal+0x253/0xd40
ext4_fill_super+0x2cc6/0x3180
...
In the replay path there's an attempt to lock sbi->s_bdev_wb_lock in
function ext4_check_bdev_write_error(). Unfortunately, at this point this
spinlock has not been initialized yet. Moving it's initialization to an
earlier point in __ext4_fill_super() fixes this splat.
📍 영향받는 시스템
Linux kernel (ext4 파일 시스템의 fast-commit 기능이 활성화된 환경)
⚔️ 공격 벡터
fast-commit 기능이 활성화된 파일 시스템을 마운트하거나 저널 복구 과정을 유도하여 발생
🛡️ 대응 방법
ext4의 락 초기화 시점을 수정한 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인