🇰🇷 한글 설명
Linux 커널의 DRM(Direct Rendering Manager) 구성 요소에서 PAGE_FLIP_EVENT를 사용할 때 신호가 전달되면 drm_crtc_commit 메모리 누수가 발생하는 취약점입니다. prepare_signaling()에서 할당된 이벤트가 complete_signaling()에서 NULL로 설정되면서 참조 카운트가 제대로 감소하지 않아 발생합니다.
💡 쉬운 설명
컴퓨터 화면을 그리는 과정에서 특정 신호가 발생하면 메모리가 제대로 해제되지 않고 계속 쌓이는 문제입니다. 이 현상이 반복되면 시스템의 메모리가 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm: Fix drm_crtc_commit leak if signaled when PAGE_FLIP_EVENT is used
Commit 1c6ceeee6ebb ("drm/atomic: Fix memleak on ERESTARTSYS during
non-blocking commits") fixed a very similar issue when the event was
allocated by drm_atomic_helper_setup_commit() itself.
However, if the event is allocated in prepare_signaling(), it will also be
set to NULL in complete_signaling(), which prevents drm_crtc_commit from
being put in __drm_atomic_helper_crtc_destroy_state().
Dropping the reference when the event is set to NULL at
complete_signaling() fixes the leak.
The leak can be reproduced by sending a signal to the thread using
DRM_MODE_PAGE_FLIP_EVENT and using a sw_sync fence to cause the atomic
ioctl to block at drm_atomic_helper_wait_for_fences(). It happened both
with amdgpu and vkms.
📍 영향받는 시스템
Linux Kernel (amdgpu 및 vkms 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
DRM_MODE_PAGE_FLIP_EVENT를 사용하는 스레드에 신호를 보내고 sw_sync 펜스를 사용하여 atomic ioctl을 차단하는 방식
🛡️ 대응 방법
커널 패치(Commit 1c6ceeee6ebb 관련 수정 사항 포함)가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.