🇰🇷 한글 설명
Linux 커널의 drm/xe/pt 구성 요소에서 xe_pt_update_ops_init() 함수가 current_op 변수를 0으로 초기화하지 않아 발생하는 취약점입니다. 이로 인해 루프 재시도 시 배열 범위를 초과하는 쓰기(Out-of-bounds write)가 발생하며, 결과적으로 SLUB 메모리 오염 및 Use-After-Free(UAF)로 인한 시스템 충돌을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 그래픽 처리 관련 기능에서 데이터를 저장하는 공간의 번호를 제대로 초기화하지 않아 발생합니다. 이로 인해 정해진 공간보다 더 많은 데이터를 쓰려고 시도하다가 시스템이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/xe/pt: Reset current_op in xe_pt_update_ops_init()
xe_pt_update_ops_init() fails to reset current_op to 0. On the
vm_bind path, ops_execute() calls xe_pt_update_ops_prepare() inside
the xe_validation_guard() / drm_exec_until_all_locked() loop. When
that loop retries due to lock contention or OOM eviction
(drm_exec_retry_on_contention() / xe_validation_retry_on_oom()),
xe_pt_update_ops_prepare() runs again on the same vops, and each
call to bind_op_prepare() increments current_op without resetting it.
After N retries current_op exceeds the array size allocated by
xe_vma_ops_alloc(), causing an out-of-bounds write into
SLUB-poisoned memory and a subsequent UAF crash in
xe_migrate_update_pgtables_cpu() when reading the corrupted pt_op->bind.
Also reset needs_svm_lock and needs_invalidation which are derived in
the same prepare pass and would otherwise cause wrong migrate ops
selection and redundant TLB invalidation on retry.
Fix this by resetting current_op, needs_svm_lock and needs_invalidation
in xe_pt_update_ops_init().
v2 (Matt):
- Add details in commit message.
- Add Fixes tag and Cc to
[email protected]
(cherry picked from commit 046045543e530605c441063535e7dca0075369a6)
📍 영향받는 시스템
Linux kernel (drm/xe/pt 모듈을 사용하는 시스템)
⚔️ 공격 벡터
메모리 잠금 경합(Lock contention) 또는 OOM(Out-of-Memory) 상황을 유도하여 특정 루프를 반복 실행시킴으로써 메모리 오염 유발
🛡️ 대응 방법
커널 패치를 적용하여 xe_pt_update_ops_init() 함수 내에서 current_op, needs_svm_lock, needs_invalidation 변수를 초기화하도록 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전이 적용되었는지 확인