🇰🇷 한글 설명
Linux 커널의 drm/xe 드라이버에서 dma-fence가 안전한 액세스 규칙을 준수하지 않아 발생하는 Use-After-Free 취약점입니다. 사용자가 제출 큐를 닫을 때 dma-fence가 가리키는 데이터(타임라인 이름 등)가 먼저 해제되어, 이를 참조하는 제3의 프로세스에서 메모리 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 그래픽 처리 과정에서 사용 중인 메모리 정보를 너무 빨리 지워버려서 발생하는 문제입니다. 이로 인해 프로그램이 잘못된 메모리에 접근하게 되어 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/xe: Make dma-fences compliant with the safe access rules
Xe can free some of the data pointed to by the dma-fences it exports. Most
notably the timeline name can get freed if userspace closes the associated
submit queue. At the same time the fence could have been exported to a
third party (for example a sync_fence fd) which will then cause an use-
after-free on subsequent access.
To make this safe we need to make the driver compliant with the newly
documented dma-fence rules. Driver has to ensure a RCU grace period
between signalling a fence and freeing any data pointed to by said fence.
For the timeline name we simply make the queue be freed via kfree_rcu and
for the shared lock associated with multiple queues we add a RCU grace
period before freeing the per GT structure holding the lock.
📍 영향받는 시스템
Linux kernel (drm/xe driver 포함 버전)
⚔️ 공격 벡터
사용자 공간(userspace)에서 특정 제출 큐를 닫아 메모리 해제를 유도한 후, 공유된 펜스(fence)를 통해 해제된 메모리에 접근
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 kfree_rcu 및 RCU grace period 적용 확인
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 패치 버전인지 배포판 보안 공지를 통해 확인