🇰🇷 한글 설명
Linux 커널의 Rockchip DRM 드라이버에서 dw_dp 인코더 초기화 시 메모리 할당 방식의 오류로 인해 Use-After-Free 취약점이 발생합니다. 기존 devm_kzalloc() 대신 drmm_kzalloc()을 사용하여 인코더 정리 과정에서 이미 해제된 메모리에 접근하는 문제를 해결했습니다.
💡 쉬운 설명
컴퓨터 부품을 제어하는 소프트웨어가 이미 삭제된 메모리 공간을 다시 사용하려고 시도하여 시스템 오류를 일으킬 수 있는 문제입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/rockchip: dw_dp: Switch to drmm_kzalloc()
Driver makes use of drmm_encoder_init() to initialize the encoder and
automatically handle the cleanup by registering drm_encoder_cleanup()
with drmm_add_action().
However, the internal structure containing the encoder part gets
allocated with devm_kzalloc(), which happens while component_bind_all()
is being called from Rockchip DRM driver. The component framework
further ensures it is deallocated as part of releasing all the resources
claimed during bind, which is triggered from component_unbind_all().
When the reference to the DRM device gets eventually dropped via
drm_dev_put() in rockchip_drm_unbind(), drmm_encoder_alloc_release()
attempts to access the now released encoder structure, leading to
use-after-free.
Ensure driver's internal structure is still reachable on encoder cleanup
by switching from a device-managed allocation to a drm-managed one.
📍 영향받는 시스템
Linux kernel (Rockchip DRM driver components)
⚔️ 공격 벡터
로컬 공격자가 특정 드라이버 동작을 유도하여 메모리 해제 후 재사용(Use-After-Free)을 일으킴
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 drmm_kzalloc()이 적용된 드라이버를 사용하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.