🇰🇷 한글 설명
Linux 커널의 Intel Xe DRM 드라이버에서, VF(가상 функション)가 GT를 리셋할 때 접근 권한이 없는 GDRST(0x941c) 레지스터에 쓰기를 시도하여 경고와 리셋 실패가 발생하는 문제입니다. 이 문제는 H2G VF_RESET(0x5507) 액션을 사용하도록 수정되었습니다.
💡 쉬운 설명
가상 머신 환경에서 그래픽 장치를 재설정할 때 권한이 없는 설정 영역에 접근하려다 오류가 발생하는 버그입니다. 커널 업데이트로 올바른 재설정 방식을 사용하도록 고쳐졌습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/xe/vf: Don't try to trigger a full GT reset if VF
VFs don't have access to the GDRST(0x941c) register that driver
uses to reset a GT. Attempt to trigger a reset using debugfs:
$ cat /sys/kernel/debug/dri/0000:00:02.1/gt0/force_reset
or due to a hang condition detected by the driver leads to:
[ ] xe 0000:00:02.1: [drm] GT0: trying reset from force_reset [xe]
[ ] xe 0000:00:02.1: [drm] GT0: reset queued
[ ] xe 0000:00:02.1: [drm] GT0: reset started
[ ] ------------[ cut here ]------------
[ ] xe 0000:00:02.1: [drm] GT0: VF is trying to write 0x1 to an inaccessible register 0x941c+0x0
[ ] WARNING: CPU: 3 PID: 3069 at drivers/gpu/drm/xe/xe_gt_sriov_vf.c:996 xe_gt_sriov_vf_write32+0xc6/0x580 [xe]
[ ] RIP: 0010:xe_gt_sriov_vf_write32+0xc6/0x580 [xe]
[ ] Call Trace:
[ ] <TASK>
[ ] ? show_regs+0x6c/0x80
[ ] ? __warn+0x93/0x1c0
[ ] ? xe_gt_sriov_vf_write32+0xc6/0x580 [xe]
[ ] ? report_bug+0x182/0x1b0
[ ] ? handle_bug+0x6e/0xb0
[ ] ? exc_invalid_op+0x18/0x80
[ ] ? asm_exc_invalid_op+0x1b/0x20
[ ] ? xe_gt_sriov_vf_write32+0xc6/0x580 [xe]
[ ] ? xe_gt_sriov_vf_write32+0xc6/0x580 [xe]
[ ] ? xe_gt_tlb_invalidation_reset+0xef/0x110 [xe]
[ ] ? __mutex_unlock_slowpath+0x41/0x2e0
[ ] xe_mmio_write32+0x64/0x150 [xe]
[ ] do_gt_reset+0x2f/0xa0 [xe]
[ ] gt_reset_worker+0x14e/0x1e0 [xe]
[ ] process_one_work+0x21c/0x740
[ ] worker_thread+0x1db/0x3c0
Fix that by sending H2G VF_RESET(0x5507) action instead.
📍 영향받는 시스템
Linux 커널의 Intel Xe DRM 드라이버를 사용하는 SR-IOV 가상 함수(VF) 환경
⚔️ 공격 벡터
로컬 사용자가 debugfs의 force_reset 항목을 조작하거나 드라이버의 hang 감지 경로를 트리거하여 리셋 오류를 유발할 수 있음
🛡️ 대응 방법
패치가 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
커널 버전이 패치가 적용된 버전 이상인지 확인하고, CONFIG_DRM_XE가 =m 또는 =y로 설정되어 있으면 Xe 드라이버가 포함된 시스템이므로 배포판의 보안 업데이트 적용 여부를 확인해야 합니다.
uname -r && (grep -E 'CONFIG_DRM_XE' /boot/config-$(uname -r) 2>/dev/null || echo 'config not found')