🇰🇷 한글 설명
Linux 커널의 ntfs3 드라이버에서 run_unpack_ex 함수 실행 중 순환 잠금 의존성(Circular Locking Dependency)으로 인한 데드락 취약점이 발견되었습니다. ntfs_extend_mft와 run_unpack_ex가 서로 다른 순서로 락을 획득하면서 시스템이 멈출 수 있는 AB-BA 데드락 상황이 발생합니다.
💡 쉬운 설명
두 작업이 서로 상대방이 가진 열쇠를 기다리며 무한히 대기하는 상태가 되어 컴퓨터가 멈출 수 있는 문제입니다. 특정 파일 시스템 작업을 할 때 시스템 전체가 응답하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ntfs3: fix circular locking dependency in run_unpack_ex
Syzbot reported a circular locking dependency between wnd->rw_lock
(sbi->used.bitmap) and ni->file.run_lock.
The deadlock scenario:
1. ntfs_extend_mft() takes ni->file.run_lock then wnd->rw_lock.
2. run_unpack_ex() takes wnd->rw_lock then tries to acquire
ni->file.run_lock inside ntfs_refresh_zone().
This creates an AB-BA deadlock.
Fix this by using down_read_trylock() instead of down_read() when
acquiring run_lock in run_unpack_ex(). If the lock is contended,
skip ntfs_refresh_zone() - the MFT zone will be refreshed on the
next MFT operation. This breaks the circular dependency since we
never block waiting for run_lock while holding wnd->rw_lock.
📍 영향받는 시스템
ntfs3 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 사용자가 특수하게 조작된 NTFS 파일 시스템을 마운트하거나 관련 파일 시스템 작업을 수행하여 데드락 유도
🛡️ 대응 방법
ntfs3 드라이버의 run_unpack_ex 함수 내 락 획득 방식을 down_read_trylock()으로 수정하여 커널 업데이트 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인