🇰🇷 한글 설명
Linux 커널의 drm/mediatek 드라이버에서 ddp_comp 배열을 초기화할 때 발생하는 취약점입니다. 특정 조건에서 배열의 추가 슬롯이 초기화되지 않아 mtk_drm_crtc_mode_valid() 함수 실행 시 시스템 충돌(Crash)을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 화면을 담당하는 부품을 제어하는 소프트웨어에서 메모리 공간을 깨끗하게 비우지 않아 오류가 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/mediatek: Init `ddp_comp` with devm_kcalloc()
In the case where `conn_routes` is true we allocate an extra slot in
the `ddp_comp` array but mtk_drm_crtc_create() never seemed to
initialize it in the test case I ran. For me, this caused a later
crash when we looped through the array in mtk_drm_crtc_mode_valid().
This showed up for me when I booted with `slub_debug=FZPUA` which
poisons the memory initially. Without `slub_debug` I couldn't
reproduce, presumably because the later code handles the value being
NULL and in most cases (not guaranteed in all cases) the memory the
allocator returned started out as 0.
It really doesn't hurt to initialize the array with devm_kcalloc()
since the array is small and the overhead of initting a handful of
elements to 0 is small. In general initting memory to zero is a safer
practice and usually it's suggested to only use the non-initting alloc
functions if you really need to.
Let's switch the function to use an allocation function that zeros the
memory. For me, this avoids the crash.
📍 영향받는 시스템
MediaTek DRM 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 공격자가 특정 디스플레이 구성 조건을 유도하여 커널 패닉(Crash)을 일으킴
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.