CVE-2026-46245
JSON

5.5medium

drm/amd/display: Fix dc_link NULL handling in HPD init

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.16% (higher than 3% of CVEs)
Published
Last changed
Assigned by
Linux

Description

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

Affected

Product or packageVersionsReported by
Linux Linuxfrom 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c before d772e8570f19ac05fd9b11c8af86ada98f35f0c8, from 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c before 0965f1e775130e325e74152d867d2e8ce865fa05, from 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c before 1d15503e454bf117a0d0078332d48df86a41c828, from 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c before a490e4d3c9fed1e690c8de348416eea3a9f054ff, from 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c before 226a40c06a183abaeb7529a4f54d6c203bd14407, 4.15
Not affected: before 4.15, from 6.6.160 up to 6.6.*, from 6.12.114 up to 6.12.*, from 6.18.57 up to 6.18.*, from 6.19.4 up to 6.19.*, from 7.0 up to *
CVE List
linux linux_kernelfrom 4.15 before 6.19.4NVD

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: drm/amd/display: Corrección del manejo de dc_link NULL en la inicialización de HPD amdgpu_dm_hpd_init() puede encontrar conectores sin un dc_link válido. El código ya verifica dc_link para la decisión de sondeo, pero luego lo desreferencia incondicionalmente al configurar las interrupciones HPD. Asigne dc_link con antelación y omita los conectores donde sea NULL. Soluciona lo siguiente: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c:940 amdgpu_dm_hpd_init() error: previamente asumimos que 'dc_link' podría ser nulo (ver línea 931) drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_irq.c 923 /* 924 * Los conectores analógicos pueden ser conectados en caliente a diferencia de otros tipos de conectores 925 * que no soportan HPD. Solo sondee los conectores analógicos. 926 */ 927 use_polling |= 928 amdgpu_dm_connector->dc_link && ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ El parche añade esta verificación de NULL pero ojalá pueda ser eliminada 929 dc_connector_supports_analog(amdgpu_dm_connector->dc_link->link_id.id); 930 931 dc_link = amdgpu_dm_connector->dc_link; dc_link asignado aquí. 932 933 /* 934 * Obtenga una referencia de irq del controlador base para las interrupciones hpd durante la vida útil 935 * de dm. Tenga en cuenta que solo los tipos de interrupción hpd se registran con 936 * el controlador base; los tipos hpd_rx no lo están. En otras palabras, amdgpu_irq_get/put en 937 * hpd_rx no está disponible. DM actualmente controla hpd_rx 938 * explícitamente con dc_interrupt_set() 939 */ --> 940 if (dc_link->irq_source_hpd != DC_IRQ_SOURCE_INVALID) { ^^^^^^^^^^^^^^^^^^^^^^^ Si es NULL, entonces tenemos problemas porque lo desreferenciamos aquí. 941 irq_type = dc_link->irq_source_hpd - DC_IRQ_SOURCE_HPD1; 942 /* 943 * PENDIENTE: Hay una discrepancia entre mode_info.num_hpd 944 * y lo que la BIOS informa como el número de conectores con hpd

References

Sources

SourceRecordLicence
CVE ListCVE-2026-46245 changed 2026-11-06CVE Terms of Use
NVDCVE-2026-46245 changed 2026-11-06Public domain