🇰🇷 한글 설명
Linux 커널의 amdgpu 드라이버에서 amdgpu_vm_get_task_info_pasid() 함수의 수명 주기 관리 오류가 발견되었습니다. 잠금(lock)이 해제된 후에도 vm 포인터를 참조하여 발생하는 Use-After-Unlock 취약점입니다.
💡 쉬운 설명
데이터를 안전하게 보호하기 위해 잠가두었던 자물쇠를 먼저 열어버린 뒤, 그 데이터를 다시 사용하려고 시도하면서 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix lifetime issue of amdgpu_vm_get_task_info_pasid()
The vm pointer returned from amdgpu_vm_get_vm_from_pasid() is only
valid while the lock is still being held. Once xa_unlock_irqrestore is
called and returned, the pointer is no longer under lock and is subject
to modification. Since, the caller still dereferences vm->task_info in
amdgpu_vm_get_task_info_vm() after the lock is removed, this causes a
use after unlock problem.
Remove the lifetime issue present in amdgpu_vm_get_task_info_pasid()
through removing the amdgpu_vm_get_vm_from_pasid() function from
amdgpu_vm.c and making the relevant code inline to hold the lock while
it is still in use.
(cherry picked from commit 9d01579f3f868b333acc901815972685989092c7)
📍 영향받는 시스템
Linux kernel (amdgpu driver component)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 특정 GPU 메모리 관리 작업을 유도하여 커널 메모리 오류를 발생시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하거나 해당 커밋(9d01579f)을 적용함
🔧 검증 코드
현재 커널 버전과 amdgpu 모듈의 버전을 확인하여 패치된 버전인지 대조함
uname -r && modinfo amdgpu | grep version