🇰🇷 한글 설명
Linux 커널의 lockd 구성 요소에서 nlm_traverse_files() 함수가 파일 포인터를 적절히 고정하지 않아 발생하는 Use-After-Free 취약점입니다. 잠금 해제 과정에서 동시성 이슈로 인해 이미 해제된 메모리에 접근할 수 있어 시스템 불안정이나 권한 상승을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터가 파일을 관리하는 과정에서, 이미 삭제된 파일의 정보를 다시 읽으려고 시도하다가 오류가 발생하는 문제입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
lockd: pin next file across nlm_inspect_file lock-drop
nlm_traverse_files() pins the current file with f_count++ across
a mutex_unlock for nlm_inspect_file(), but nothing pins the saved
next pointer. A concurrent nlm_release_file() can kfree the next
file during the unlock window, and the iterator dereferences freed
memory on the next loop step.
Pin both current and next before the lock-drop. Advance by
swapping the pinned cursors at the end of each iteration so next
is always held alive across the unlock.
Always call nlm_file_release() after dropping the iteration pin,
regardless of whether the file matched the predicate. Use
nlm_file_inuse(), which does a live walk of the inode lock list,
rather than the cached f_locks field, so skipped files that never
ran nlm_inspect_file() are evaluated correctly.
Because every file in a hash bucket is now pinned and released,
files skipped by the is_failover_file predicate that have no
locks, blocks, shares, or external references are deleted during
traversal. The old code never evaluated skipped files for
cleanup. The new behavior is intentional: such files are stale
and should not persist in the table.
📍 영향받는 시스템
Linux Kernel (lockd 구성 요소가 포함된 버전)
⚔️ 공격 벡터
동시성 제어 미흡을 이용한 Race Condition 공격을 통해 해제된 메모리 참조 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인