🔍 CVE-2025-40288

0.0
CVSS Score
UNKNOWN
2025-12-06
2026-10-14 22:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 amdgpu 드라이버에서 APU 장치의 VRAM 로직 처리 중 NULL 포인터 역참조 취약점이 발견되었습니다. VRAM 매니저의 백킹 디바이스(bdev)가 초기화되지 않은 상태에서 해당 포인터에 접근하려 할 때 커널 OOPS(시스템 오류)가 발생합니다.

💡 쉬운 설명

컴퓨터의 그래픽 처리 장치(APU)가 메모리를 관리할 때, 존재하지 않는 메모리 주소를 참조하려고 시도하여 시스템이 멈추거나 오류가 발생하는 문제입니다. 이는 특정 그래픽 드라이버 설정에서 메모리 정보가 제대로 준비되지 않았을 때 발생합니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Fix NULL pointer dereference in VRAM logic for APU devices Previously, APU platforms (and other scenarios with uninitialized VRAM managers) triggered a NULL pointer dereference in `ttm_resource_manager_usage()`. The root cause is not that the `struct ttm_resource_manager *man` pointer itself is NULL, but that `man->bdev` (the backing device pointer within the manager) remains uninitialized (NULL) on APUs—since APUs lack dedicated VRAM and do not fully set up VRAM manager structures. When `ttm_resource_manager_usage()` attempts to acquire `man->bdev->lru_lock`, it dereferences the NULL `man->bdev`, leading to a kernel OOPS. 1. **amdgpu_cs.c**: Extend the existing bandwidth control check in `amdgpu_cs_get_threshold_for_moves()` to include a check for `ttm_resource_manager_used()`. If the manager is not used (uninitialized `bdev`), return 0 for migration thresholds immediately—skipping VRAM-specific logic that would trigger the NULL dereference. 2. **amdgpu_kms.c**: Update the `AMDGPU_INFO_VRAM_USAGE` ioctl and memory info reporting to use a conditional: if the manager is used, return the real VRAM usage; otherwise, return 0. This avoids accessing `man->bdev` when it is NULL. 3. **amdgpu_virt.c**: Modify the vf2pf (virtual function to physical function) data write path. Use `ttm_resource_manager_used()` to check validity: if the manager is usable, calculate `fb_usage` from VRAM usage; otherwise, set `fb_usage` to 0 (APUs have no discrete framebuffer to report). This approach is more robust than APU-specific checks because it: - Works for all scenarios where the VRAM manager is uninitialized (not just APUs), - Aligns with TTM's design by using its native helper function, - Preserves correct behavior for discrete GPUs (which have fully initialized `man->bdev` and pass the `ttm_resource_manager_used()` check). v4: use ttm_resource_manager_used(&adev->mman.vram_mgr.manager) instead of checking the adev->gmc.is_app_apu flag (Christian)

📍 영향받는 시스템

Linux Kernel (amdgpu 드라이버를 사용하는 APU 기반 시스템)

⚔️ 공격 벡터

로컬 공격자가 특정 ioctl 호출이나 메모리 관리 관련 작업을 통해 커널 오류를 유발할 수 있음

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 amdgpu 드라이버의 VRAM 매니저 검증 로직을 수정해야 함

🔧 검증 코드

출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인하십시오.

Shell / Script
uname -r

💻 영향받는 소프트웨어

NVIDIA Cloud Gaming Virtual GPU Manager