🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템에서 $Extend의 inode 모드가 일반 파일로 설정된 경우, truncate 시스템 호출 시 run_lock이 초기화되지 않아 발생하는 오류입니다. 이로 인해 커널의 lockdep 메커니즘에서 초기화되지 않은 락 사용에 대한 오류가 보고되었습니다.
💡 쉬운 설명
파일의 크기를 조절하는 명령을 내릴 때, 시스템 내부의 잠금 장치가 제대로 준비되지 않아 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ntfs3: init run lock for extend inode
After setting the inode mode of $Extend to a regular file, executing the
truncate system call will enter the do_truncate() routine, causing the
run_lock uninitialized error reported by syzbot.
Prior to patch 4e8011ffec79, if the inode mode of $Extend was not set to
a regular file, the do_truncate() routine would not be entered.
Add the run_lock initialization when loading $Extend.
syzbot reported:
INFO: trying to register non-static key.
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
assign_lock_key+0x133/0x150 kernel/locking/lockdep.c:984
register_lock_class+0x105/0x320 kernel/locking/lockdep.c:1299
__lock_acquire+0x99/0xd20 kernel/locking/lockdep.c:5112
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
down_write+0x96/0x1f0 kernel/locking/rwsem.c:1590
ntfs_set_size+0x140/0x200 fs/ntfs3/inode.c:860
ntfs_extend+0x1d9/0x970 fs/ntfs3/file.c:387
ntfs_setattr+0x2e8/0xbe0 fs/ntfs3/file.c:808
📍 영향받는 시스템
ntfs3 드라이버를 사용하는 Linux 커널 (패치 4e8011ffec79 적용 전 버전)
⚔️ 공격 벡터
로컬 공격자가 NTFS3 파일 시스템이 마운트된 환경에서 $Extend의 inode 모드를 조작한 후 truncate 시스템 호출을 실행
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전(패치 4e8011ffec79 포함)으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인