🇰🇷 한글 설명
Linux 커널의 ocfs2 파일 시스템에서 VM_FAULT_RETRY 발생 시 ocfs2_fault() 함수 내에 Use-After-Free 취약점이 존재합니다. filemap_fault()가 mmap_lock을 해제하는 과정에서 동시에 munmap()이 호출되면 vma 포인터가 무효화되어 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 메모리를 사용하던 중, 다른 작업이 해당 메모리 공간을 갑자기 삭제해버려 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 보안상 위험한 상태가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY
filemap_fault() may drop the mmap_lock before returning VM_FAULT_RETRY,
as documented in mm/filemap.c:
"If our return value has VM_FAULT_RETRY set, it's because the mmap_lock
may be dropped before doing I/O or by lock_folio_maybe_drop_mmap()."
When this happens, a concurrent munmap() can call remove_vma() and free
the vm_area_struct via RCU. The saved 'vma' pointer in ocfs2_fault() then
becomes a dangling pointer, and the subsequent trace_ocfs2_fault() call
dereferences it -- a use-after-free.
Fix this by saving ip_blkno as a plain integer before calling
filemap_fault(), and removing vma from the trace event. Since
ip_blkno is copied by value before the lock can be dropped, it
remains valid regardless of what happens to the vma or inode
afterward.
📍 영향받는 시스템
Linux Kernel (ocfs2 파일 시스템을 사용하는 시스템)
⚔️ 공격 벡터
동시성 제어 오류를 이용한 메모리 해제 후 재사용 공격 (Race Condition)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인하십시오.