🇰🇷 한글 설명
Linux 커널의 drm/amdkfd 구성 요소에서 kfd_criu_resume_svm 함수가 리스트에서 항목을 제거하지 않고 메모리를 해제하여 발생하는 취약점입니다. 이로 인해 Use-After-Free 및 Double-Free 오류가 발생할 수 있으며, 권한이 없는 사용자가 /dev/kfd를 통해 이를 악용할 수 있습니다.
💡 쉬운 설명
컴퓨터 메모리 관리 과정에서 이미 삭제된 정보를 다시 삭제하려고 시도하거나 잘못된 정보를 읽으려 할 때 발생하는 오류입니다. 해커가 이 허점을 이용하면 시스템을 강제로 종료시키거나 보안을 무너뜨릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: fix list_del corruption in kfd_criu_resume_svm
The cleanup tail of kfd_criu_resume_svm() walks
svms->criu_svm_metadata_list and kfree()s each struct criu_svm_metadata
without removing it from the list. The list head is left pointing at
freed kmalloc-96 objects.
A second AMDKFD_IOC_CRIU_OP from the same process re-enters: list_empty()
reads the dangling ->next (use-after-free), the loop walks freed entries,
and each is kfree()'d again (double-free). This is reachable by an
unprivileged render-group user via /dev/kfd with no capabilities required.
Add list_del() before the kfree() so the list is properly emptied. The
list_for_each_entry_safe() iterator already caches the next pointer, so
unlinking during the walk is safe.
(cherry picked from commit 6322d278a298e2c1430b9d2697743d3a04b788b1)
📍 영향받는 시스템
Linux Kernel (amdkfd 드라이버 포함 버전)
⚔️ 공격 벡터
권한이 없는 사용자가 /dev/kfd 장치 파일을 통해 특정 IOCTL 명령을 반복 호출하여 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 list_del() 로직이 포함된 수정 사항을 적용해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전 이상인지 확인합니다.