🇰🇷 한글 설명
Linux 커널의 amdgpu 드라이버에서 초기화 순서 오류로 인해 발생하는 취약점입니다. 초기화 과정 중 오류가 발생할 경우, 아직 초기화되지 않은 메모리 포인터를 참조하게 되어 커널 패닉(Kernel Panic)이 발생할 수 있습니다.
💡 쉬운 설명
그래픽 카드 드라이버가 컴퓨터를 켤 때 준비 과정을 거치는데, 준비가 덜 된 상태에서 오류가 나면 시스템이 길을 잃고 멈춰버리는 문제입니다. 이로 인해 컴퓨터가 갑자기 꺼지거나 재부팅될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: Fix init ordering in amdgpu_vram_mgr_init()
drmm_cgroup_register_region() is called before INIT_LIST_HEAD() and
gpu_buddy_init() in amdgpu_vram_mgr_init(). If it fails, the function
returns early and bypasses those initializations.
Since adev->mman.initialized is set to true before amdgpu_vram_mgr_init()
is called, a failure triggers amdgpu_ttm_fini(), which calls
amdgpu_vram_mgr_fini(), which then:
- Calls list_for_each_entry_safe() on reservations_pending and
reserved_pages, whose list_head::next pointers are zero-initialized
(NULL). The loop does not recognize them as empty and dereferences NULL.
- Calls gpu_buddy_fini(), which iterates free_trees[] unconditionally
via for_each_free_tree(). Since mm->free_trees is NULL
(never allocated), this dereferences NULL.
Both result in a kernel panic on the module load error path.
Fix by moving drmm_cgroup_register_region() to after the list and buddy
allocator are fully initialized, so the teardown path is safe to run.
📍 영향받는 시스템
Linux kernel (amdgpu driver module)
⚔️ 공격 벡터
로컬 공격자가 드라이버 로드 과정에서 특정 오류를 유도하여 시스템을 중단시킴 (DoS)
🛡️ 대응 방법
amdgpu_vram_mgr_init() 함수의 초기화 순서를 수정한 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치가 적용된 버전인지 배포판 보안 공지를 통해 확인