🇰🇷 한글 설명
Linux 커널의 AMD KFD 드라이버에서 debugfs 파괴 순서 오류로 인한 NULL 포인터 예외가 발생합니다. kfd_debugfs_fini가 kfd_process_destroy_wq보다 먼저 실행되어 이미 삭제된 /sys/kernel/debug/kfd 경로에 접근하려고 시도하면서 커널을 행(hang)시킵니다.
💡 쉬운 설명
Linux 커널의 AMD 그래픽 드라이버 정리 과정에서 순서가 잘못되었습니다. 이미 삭제된 폴더에 접근하려고 해서 시스템이 응답 불가 상태가 됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: Destroy KFD debugfs after destroy KFD wq
Since KFD proc content was moved to kernel debugfs, we can't destroy KFD
debugfs before kfd_process_destroy_wq. Move kfd_process_destroy_wq prior
to kfd_debugfs_fini to fix a kernel NULL pointer problem. It happens
when /sys/kernel/debug/kfd was already destroyed in kfd_debugfs_fini but
kfd_process_destroy_wq calls kfd_debugfs_remove_process. This line
debugfs_remove_recursive(entry->proc_dentry);
tries to remove /sys/kernel/debug/kfd/proc/<pid> while
/sys/kernel/debug/kfd is already gone. It hangs the kernel by kernel
NULL pointer.
(cherry picked from commit 0333052d90683d88531558dcfdbf2525cc37c233)
📍 영향받는 시스템
Linux kernel with AMD KFD (Kernel Fusion Debug) driver support
⚔️ 공격 벡터
Local kernel hang via improper debugfs cleanup sequence during shutdown or process termination
🛡️ 대응 방법
Update Linux kernel to patched version containing commit 0333052d90683d88531558dcfdbf2525cc37c233 or later
🔧 검증 코드
커널 버전 확인 후 amdkfd 모듈 로드 여부 확인. 로드되어 있으면 패치된 커널로 업데이트 필요
uname -r && lsmod | grep -i amdkfd