🇰🇷 한글 설명
Linux 커널의 amdgpu 드라이버에서 RDNA4(GFX 12) 하드웨어의 특정 메모리 자원(GDS, GWS, OA) 크기가 0일 때 발생하는 취약점입니다. 자원 크기가 0임에도 불구하고 초기화 함수가 호출되어 커널의 DRM_MM_BUG_ON 검증을 통과하지 못하고 시스템이 충돌(Kernel Panic)을 일으킵니다.
💡 쉬운 설명
새로운 AMD 그래픽 카드를 사용할 때, 컴퓨터가 그래픽 카드를 인식하는 과정에서 시스템이 갑자기 멈추거나 꺼지는 문제입니다. 존재하지 않는 메모리 공간을 만들려고 시도하다가 오류가 발생하는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix zero-size GDS range init on RDNA4
RDNA4 (GFX 12) hardware removes the GDS, GWS, and OA on-chip memory
resources. The gfx_v12_0 initialisation code correctly leaves
adev->gds.gds_size, adev->gds.gws_size, and adev->gds.oa_size at
zero to reflect this.
amdgpu_ttm_init() unconditionally calls amdgpu_ttm_init_on_chip() for
each of these resources regardless of size. When the size is zero,
amdgpu_ttm_init_on_chip() forwards the call to ttm_range_man_init(),
which calls drm_mm_init(mm, 0, 0). drm_mm_init() immediately fires
DRM_MM_BUG_ON(start + size <= start) -- trivially true when size is
zero -- crashing the kernel during modprobe of amdgpu on an RX 9070 XT.
Guard against this by returning 0 early from
amdgpu_ttm_init_on_chip() when size_in_page is zero. This skips TTM
resource manager registration for hardware resources that are absent,
without affecting any other GPU type.
DRM_MM_BUG_ON() only asserts if CONFIG_DRM_DEBUG_MM is enabled in
the kernel config. This is apparently rarely enabled as these chips
have been in the market for over a year and this issue was only reported
now.
Oops-Analysis: http://oops.fenrus.org/reports/bugzilla.korg/221376/report.html
(cherry picked from commit 5719ce5865279cad4fd5f01011fe037168503f2d)
📍 영향받는 시스템
RDNA4(GFX 12) 아키텍처 기반 GPU(예: RX 9070 XT 등)를 사용하는 Linux 시스템
⚔️ 공격 벡터
로컬 공격자가 취약한 드라이버가 포함된 커널을 사용하는 시스템에서 amdgpu 모듈을 로드할 때 발생 (DoS)
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하거나, 해당 패치(commit 5719ce5865279cad4fd5f01011fe037168503f2d)가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
현재 사용 중인 커널 버전과 amdgpu 모듈 정보를 확인하여 패치가 적용된 최신 커널인지 확인합니다.
uname -r && modinfo amdgpu | grep version