🇰🇷 한글 설명
Linux 커널의 NTFS 파일 시스템 구현에서 rename 작업 시 mrec_lock의 ABBA 데드락 취약점이 발견되었습니다. 특정 파일 동기화 작업과 이름 변경 작업이 서로 다른 순서로 잠금(lock)을 획득하려고 시도할 때 시스템이 멈출 수 있습니다.
💡 쉬운 설명
파일의 이름을 바꾸는 과정과 파일 내용을 저장하는 과정이 서로 엉켜서 컴퓨터가 아무것도 못 하고 멈춰버리는 현상입니다. 마치 두 사람이 서로 상대방이 가진 열쇠를 먼저 달라고 버티며 아무도 움직이지 못하는 상황과 같습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ntfs: fix mrec_lock ABBA deadlock in rename
ntfs_file_fsync(), ntfs_dir_fsync() and __ntfs_write_inode() lock an
inode's mrec_lock before taking the mrec_lock of its parent directory.
ntfs_rename() takes old_ni->mrec_lock and old_dir_ni->mrec_lock
before taking new_ni->mrec_lock for an existing target, or
new_dir_ni->mrec_lock for a cross-directory rename.
This can deadlock when ntfs_file_fsync() or __ntfs_write_inode() holds
the target inode, or when ntfs_dir_fsync() holds a child target
directory, while rename() holds the parent directory and waits for the
target.
Fix this by locking the existing target inode before taking any parent
directory mrec_lock. For cross-directory renames where the target parent
is a descendant of the source parent, lock the target parent before the
source parent so the directory order matches the child-to-parent order used
by ntfs_file_fsync(), ntfs_dir_fsync(), and __ntfs_write_inode().
📍 영향받는 시스템
NTFS 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 사용자가 특정 파일 시스템 작업(rename 및 fsync)을 교차로 수행하여 데드락 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.