🇰🇷 한글 설명
Linux 커널의 amdgpu 드라이버에서 하나의 제출(submit) 작업 내에 중복된 FENCE 청크를 허용하여 발생하는 메모리 누수 취약점입니다. 중복된 ID가 입력될 경우 참조 카운트가 적절히 관리되지 않아 버퍼 객체(BO)의 참조가 해제되지 않고 시스템에 남게 됩니다.
💡 쉬운 설명
그래픽 카드 드라이버가 명령을 처리할 때 중복된 신호를 받으면 메모리를 제대로 정리하지 못하는 문제입니다. 이로 인해 사용하지 않는 메모리가 계속 쌓여 시스템 성능이 저하되거나 자원이 고갈될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: disallow multiple FENCE chunks in one submit
amdgpu_cs_pass1() dispatches on chunk_id once per chunk without
rejecting repeated ids. p->uf_bo is a single-slot field, so a
submission carrying two AMDGPU_CHUNK_ID_FENCE chunks runs
amdgpu_cs_p1_user_fence() twice, and the second run overwrites
p->uf_bo with a freshly referenced BO without dropping the reference
taken by the first.
amdgpu_cs_parser_fini() only unrefs the final p->uf_bo, so every FENCE
chunk but the last leaks a BO reference. The leaked BO outlives handle
close and process exit.
Reject duplicate FENCE chunks the same way commit fec5f8e8c6bc
("drm/amdgpu: disallow multiple BO_HANDLES chunks in one submit") did
for p->bo_list.
(cherry picked from commit 665b1fc2a1845206408f9a2c6da67101789edb82)
📍 영향받는 시스템
Linux Kernel (amdgpu 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
특수하게 조작된 AMDGPU_CHUNK_ID_FENCE 청크를 포함한 명령 제출을 통한 메모리 누수 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 중복 FENCE 청크를 거부하도록 수정
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인