🇰🇷 한글 설명
Linux 커널의 amdxdna 드라이버 내 amdxdna_insert_pages() 함수에서 페이지 삽입 오류가 발생할 때 vm_ops->close(vma)를 잘못 호출하는 취약점이 발견되었습니다. 이로 인해 mmap 시스템 호출이 완료되기 전에 리소스가 해제되어, 나중에 VMA 해제 시 참조 횟수 언더플로우(Reference Count Underflow)가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리를 관리하는 과정에서 실수로 이미 사용 중인 자원을 미리 해제해 버리는 오류입니다. 이로 인해 시스템이 혼란을 겪어 프로그램이 강제 종료되거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
accel/amxdna: Fix page-insertion errors in amdxdna_insert_pages()
Two error paths in amdxdna_insert_pages() called vma->vm_ops->close(vma)
before returning an error code to the caller. This is incorrect:
amdxdna_gem_obj_mmap() registers an HMM interval notifier before calling
amdxdna_insert_pages(), and on a hard error it jumps to hmm_unreg to undo
that registration. Calling vm_ops->close() manually — which drops the
shmem pages_pin_count and the GEM object reference that backs the VMA —
before the mmap syscall has even returned causes those resources to be
released while the VMA is still alive. The kernel VMA teardown will call
vm_ops->close() a second time when the process later unmaps the range,
producing a reference count underflow.
Replace both hard-error returns with a deferred-fault approach that keeps
the VMA alive and retries page insertion through the HMM range-fault path.
📍 영향받는 시스템
Linux kernel (amdxdna driver component)
⚔️ 공격 벡터
특정 조건에서 메모리 매핑(mmap)을 유도하여 참조 횟수 언더플로우를 일으키는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 deferred-fault 방식이 적용된 amdxdna 드라이버를 사용하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이상인지 확인하십시오.