🇰🇷 한글 설명
Linux 커널의 amdgpu 드라이버에서 amdgpu_bo_create_reserved 함수 호출 시 발생하는 메모리 누수 취약점입니다. 기존에는 이미 존재하는 버퍼 포인터가 전달되어도 불필요하게 핀(pin) 카운트를 증가시켜, TTM이 해당 버퍼를 이동하거나 해제하지 못하게 만듭니다.
💡 쉬운 설명
그래픽 카드가 사용하는 메모리 관리 과정에서 사용이 끝난 메모리를 제대로 놓아주지 못하는 버그가 있습니다. 이로 인해 시스템을 오래 사용하면 메모리가 계속 쌓여 성능이 떨어지거나 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix bo->pin leaking in amdgpu_bo_create_reserved
amdgpu_bo_create_reserved() only allocates a new BO when
*bo_ptr (struct amdgpu_bo **bo_ptr as input parameter) is
NULL, it simply skips creation when *bo_ptr is non-NULL.
But it unconditionally reserves, pins, gart allocates
and maps the BO afterwards.
When the same non-NULL BO pointer is passed in again,
for example firmware buffers that live in adev and are
re-loaded on every resume / cp_resume / start
under AMDGPU_FW_LOAD_DIRECT, amdgpu_bo_pin() just increases
pin_count unconditionally, however the matching teardown only unpins
once, so pin_count never drops to zero, so TTM is not able
to move, swap or evict a BO, causing BO leaks.
This commit fixes this issue by only pinning the bo
once at creation, and repeated calls no longer
take additional pin references.
(cherry picked from commit 3ddc0ae76202c447b6aec61e907b852bc94671cf)
📍 영향받는 시스템
Linux kernel (amdgpu driver 포함 버전)
⚔️ 공격 벡터
로컬 시스템에서 특정 그래픽 드라이버 동작(예: 절전 모드 복구)을 유도하여 메모리 누수 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux