🇰🇷 한글 설명
Linux 커널의 drm/xe/guc 드라이버에서 실행 큐(exec queue) 해제 시 GuC의 실행 상태를 적절히 확인하지 않아 발생하는 취약점입니다. 드라이버가 강제로 언바인딩될 때 GuC와의 통신이 중단되면 자원 해제 프로세스가 완료되지 않아 시스템 오류가 발생할 수 있습니다.
💡 쉬운 설명
그래픽 카드 관련 소프트웨어가 작업을 정리하는 과정에서, 이미 꺼져버린 장치에 명령을 보내려다 오류가 발생하는 문제입니다. 이로 인해 시스템 자원이 제대로 정리되지 않고 오류 메시지가 나타날 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/xe/guc: Check GuC running state before deregistering exec queue
In normal operation, a registered exec queue is disabled and
deregistered through the GuC, and freed only after the GuC confirms
completion. However, if the driver is forced to unbind while the exec
queue is still running, the user may call exec_destroy() after the GuC
has already been stopped and CT communication disabled.
In this case, the driver cannot receive a response from the GuC,
preventing proper cleanup of exec queue resources. Fix this by directly
releasing the resources when GuC is not running.
Here is the failure dmesg log:
"
[ 468.089581] ---[ end trace 0000000000000000 ]---
[ 468.089608] pci 0000:03:00.0: [drm] *ERROR* GT0: GUC ID manager unclean (1/65535)
[ 468.090558] pci 0000:03:00.0: [drm] GT0: total 65535
[ 468.090562] pci 0000:03:00.0: [drm] GT0: used 1
[ 468.090564] pci 0000:03:00.0: [drm] GT0: range 1..1 (1)
[ 468.092716] ------------[ cut here ]------------
[ 468.092719] WARNING: CPU: 14 PID: 4775 at drivers/gpu/drm/xe/xe_ttm_vram_mgr.c:298 ttm_vram_mgr_fini+0xf8/0x130 [xe]
"
v2: use xe_uc_fw_is_running() instead of xe_guc_ct_enabled().
As CT may go down and come back during VF migration.
(cherry picked from commit 9b42321a02c50a12b2beb6ae9469606257fbecea)
📍 영향받는 시스템
Linux Kernel (drm/xe/guc 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자가 드라이버 언바인딩을 유도하거나 특정 조건에서 exec_destroy()를 호출하여 자원 해제 실패 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 GuC 실행 상태 확인 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전(commit 9b42321a 적용 버전)인지 확인