🇰🇷 한글 설명
Linux 커널의 drm/xe 드라이버 내 xe_exec_queue_create_ioctl() 함수에서 오류 처리 미흡으로 인한 취약점이 발견되었습니다. 특정 오류 발생 시 실행 큐를 적절히 제거하지 않아 댕글링 포인터 및 Use-After-Free(UAF) 문제가 발생할 수 있습니다.
💡 쉬운 설명
프로그램이 작업을 하다가 에러가 났을 때, 사용하던 메모리나 목록에서 해당 작업을 깨끗이 지우지 못하는 버그입니다. 이로 인해 나중에 이미 사라진 데이터를 다시 참조하려고 시도하면서 시스템이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/xe: Fix error cleanup in xe_exec_queue_create_ioctl()
Two error handling issues exist in xe_exec_queue_create_ioctl():
1. When xe_hw_engine_group_add_exec_queue() fails, the error path jumps
to put_exec_queue which skips xe_exec_queue_kill(). If the VM is in
preempt fence mode, xe_vm_add_compute_exec_queue() has already added
the queue to the VM's compute exec queue list. Skipping the kill
leaves the queue on that list, leading to a dangling pointer after
the queue is freed.
2. When xa_alloc() fails after xe_hw_engine_group_add_exec_queue() has
succeeded, the error path does not call
xe_hw_engine_group_del_exec_queue() to remove the queue from the hw
engine group list. The queue is then freed while still linked into
the hw engine group, causing a use-after-free.
Fix both by:
- Changing the xe_hw_engine_group_add_exec_queue() failure path to jump
to kill_exec_queue so that xe_exec_queue_kill() properly removes the
queue from the VM's compute list.
- Adding a del_hw_engine_group label before kill_exec_queue for the
xa_alloc() failure path, which removes the queue from the hw engine
group before proceeding with the rest of the cleanup.
(cherry picked from commit 37c831f401746a45d510b312b0ed7a77b1e06ec8)
📍 영향받는 시스템
Linux kernel (drm/xe driver component)
⚔️ 공격 벡터
로컬 사용자가 특수하게 조작된 ioctl 호출을 통해 커널 메모리 오류를 유도하여 실행
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.