🇰🇷 한글 설명
Linux 커널의 DRM/AMD 디스플레이 드라이버에서 HPD 초기화 과정에서 dc_link 포인터가 NULL인 경우에도 무조건적으로 역참조하여 발생하는 NULL 포인터 디레퍼런스 취약점입니다. 이는 시스템의 불안정성을 초래하거나 서비스 거부(DoS)를 유발할 수 있습니다.
💡 쉬운 설명
그래픽 드라이버가 연결된 디스플레이 장치를 초기화할 때, 존재하지 않는 링크를 잘못 처리하여 시스템이 충돌할 수 있는 문제입니다. 이를 해결하기 위해 NULL 체크 로직을 추가하여 안정적인 동작을 보장합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Fix dc_link NULL handling in HPD init
amdgpu_dm_hpd_init() may see connectors without a valid dc_link.
The code already checks dc_link for the polling decision, but later
unconditionally dereferences it when setting up HPD interrupts.
Assign dc_link early and skip connectors where it is NULL.
Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:940 amdgpu_dm_hpd_init()
error: we previously assumed 'dc_link' could be null (see line 931)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c
923 /*
924 * Analog connectors may be hot-plugged unlike other connector
925 * types that don't support HPD. Only poll analog connectors.
926 */
927 use_polling |=
928 amdgpu_dm_connector->dc_link &&
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The patch adds this NULL check but hopefully it can be removed
929 dc_connector_supports_analog(amdgpu_dm_connector->dc_link->link_id.id);
930
931 dc_link = amdgpu_dm_connector->dc_link;
dc_link assigned here.
932
933 /*
934 * Get a base driver irq reference for hpd ints for the lifetime
935 * of dm. Note that only hpd interrupt types are registered with
936 * base driver; hpd_rx types aren't. IOW, amdgpu_irq_get/put on
937 * hpd_rx isn't available. DM currently controls hpd_rx
938 * explicitly with dc_interrupt_set()
939 */
--> 940 if (dc_link->irq_source_hpd != DC_IRQ_SOURCE_INVALID) {
^^^^^^^^^^^^^^^^^^^^^^^ If it's NULL then we are trouble because we dereference it here.
941 irq_type = dc_link->irq_source_hpd - DC_IRQ_SOURCE_HPD1;
942 /*
943 * TODO: There's a mismatch between mode_info.num_hpd
944 * and what bios reports as the # of connectors with hpd
📍 영향받는 시스템
Linux kernel (AMD GPU driver/amdgpu_dm)
⚔️ 공격 벡터
로컬 물리적 접근 또는 디스플레이 연결 상태 변경을 통한 서비스 거부
🛡️ 대응 방법
사용 중인 Linux 커널의 최신 안정 버전으로 업데이트하여 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 CVE가 패치된 최신 버전인지 확인