🇰🇷 한글 설명
Linux 커널의 amdxdna 드라이버에서 amdxdna_gem_dmabuf_mmap() 함수 호출 중 use-after-free 취약점이 발견되었습니다. vm_insert_pages() 실패 시 에러 처리 과정에서 GEM 객체의 참조 횟수를 중복으로 감소시켜 이미 해제된 메모리에 접근하게 됩니다.
💡 쉬운 설명
프로그램이 사용 중인 메모리를 실수로 먼저 지워버린 후, 다시 그 메모리를 사용하려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 보안 공격에 악용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
accel/amdxdna: Fix use-after-free in amdxdna_gem_dmabuf_mmap()
When vm_insert_pages() fails, the error path calls vma->vm_ops->close(vma)
which internally calls drm_gem_vm_close() → drm_gem_object_put(),
releasing the GEM object reference acquired at the start of the function.
However, the close_vma label then falls through to put_obj, which calls
drm_gem_object_put() a second time on the same object.
If the first put releases the last reference, the object is freed and the
second put accesses freed memory, causing a use-after-free.
Fix by returning directly from close_vma instead of falling through to
put_obj, since the close handler already performs all necessary cleanup
including the object put.
📍 영향받는 시스템
Linux kernel (accel/amdxdna 드라이버 포함 버전)
⚔️ 공격 벡터
특정 조건에서 메모리 매핑 오류를 유도하여 해제된 메모리 영역에 접근
🛡️ 대응 방법
amdxdna 드라이버의 에러 처리 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.