🇰🇷 한글 설명
Linux 커널의 drm/amdkfd 드라이버에서 GFX11 아키텍처의 SDMA 큐 체크포인트/복구 과정 중 버퍼 오버플로우 취약점이 발견되었습니다. v11 MQD 관리자가 SDMA 큐에 대해 잘못된 구조체 크기를 사용하여 1536바이트의 메모리 누수 또는 인접 GTT 메모리 오염을 유발합니다.
💡 쉬운 설명
그래픽 카드 메모리를 관리하는 과정에서 데이터 크기를 잘못 계산하여, 옆에 있는 중요한 데이터를 읽어 가거나 덮어씌울 수 있는 오류입니다. 이로 인해 시스템 정보가 유출되거나 메모리가 손상될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: Fix buffer overflow in SDMA queue checkpoint/restore on GFX11
The v11 MQD manager incorrectly assigned the CP-compute variants of
checkpoint_mqd/restore_mqd for KFD_MQD_TYPE_SDMA queues. These functions
use sizeof(struct v11_compute_mqd) (2048 bytes) instead of sizeof(struct
v11_sdma_mqd) (512 bytes), causing a 1536-byte overflow.
During CRIU checkpoint of an SDMA queue on Navi3x:
- checkpoint_mqd() reads 2048 bytes from a 512-byte SDMA MQD buffer,
leaking 1536 bytes of adjacent GTT memory to userspace
During CRIU restore:
- restore_mqd() writes 2048 bytes into a 512-byte SDMA MQD buffer,
corrupting 1536 bytes of adjacent GTT memory (often the ring buffer
or neighboring MQDs)
This is a copy-paste regression unique to v11. All other ASIC backends
(cik, vi, v9, v10, v12) correctly use the SDMA-specific variants.
Add checkpoint_mqd_sdma() and restore_mqd_sdma() functions that properly
handle the smaller v11_sdma_mqd structure, matching the pattern used in
other MQD managers.
(cherry picked from commit 6fa41db7ffdec97d62433adf03b7b9b759af8c2c)
📍 영향받는 시스템
Linux Kernel (GFX11/Navi3x 아키텍처를 사용하는 시스템)
⚔️ 공격 벡터
CRIU를 이용한 SDMA 큐의 체크포인트 또는 복구 작업 수행 시 발생
🛡️ 대응 방법
SDMA 전용 체크포인트/복구 함수(checkpoint_mqd_sdma, restore_mqd_sdma)가 포함된 최신 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 패치된 버전인지 확인합니다.