🇰🇷 한글 설명
Linux 커널의 drm/msm 드라이버에서 msm_ringbuffer 및 msm_gem_vm 객체가 해제된 후에도 특정 펜스 객체가 해당 메모리를 참조하여 발생하는 Use-After-Free 취약점입니다. 비특권 사용자가 SYNC_IOC_FILE_INFO를 통해 해제된 슬랩 메모리에 접근하여 시스템 불안정성을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터의 그래픽 처리 과정에서 이미 삭제된 메모리 정보를 잘못된 방식으로 다시 읽으려고 할 때 발생하는 보안 결함입니다. 이로 인해 시스템이 멈추거나 해커가 메모리 정보를 훔쳐볼 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/msm: RCU-free the scheduler-containing ring and VM objects
Both struct msm_ringbuffer and struct msm_gem_vm embed a struct
drm_gpu_scheduler. msm_ringbuffer_destroy() and the VM free callback
msm_gem_vm_free() call drm_sched_fini() on the embedded scheduler and then
free the containing object with plain kfree().
drm_sched_fence_get_timeline_name() returns fence->sched->name, and the
scheduler fence keeps a .release callback so it is not ops-detached on
signalling. A finished fence exported to userspace (the submit out-fence, or
a VM_BIND fence, via sync_file / drm_syncobj) keeps pointing at the embedded
scheduler after the ring/VM is freed, so a later get_timeline_name() --
reachable unprivileged through SYNC_IOC_FILE_INFO -- dereferences freed slab
memory (KASAN slab-use-after-free read).
Per the dma-fence lifetime contract the exporter must keep the data backing a
signalled fence alive for an RCU grace period. Free the scheduler-containing
objects with kfree_rcu() instead of kfree().
Patchwork: https://patchwork.freedesktop.org/patch/750234/
📍 영향받는 시스템
Linux kernel (drm/msm driver 포함 버전)
⚔️ 공격 벡터
비특권 사용자가 SYNC_IOC_FILE_INFO 시스템 호출을 통해 해제된 메모리 영역에 접근
🛡️ 대응 방법
kfree() 대신 kfree_rcu()를 사용하여 RCU grace period 동안 객체의 생명주기를 보장하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.