5.5medium
drm/msm: Avoid NULL dereference in msm_disp_state_print_regs()
- Severity
- 5.5medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.22% (higher than 12% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: drm/msm: Avoid NULL dereference in msm_disp_state_print_regs() If the allocation in msm_disp_state_dump_regs() failed then `block->state` can be NULL. The msm_disp_state_print_regs() function _does_ have code to try to handle it with: if (*reg) dump_addr = *reg; ...but since "dump_addr" is initialized to NULL the above is actually a noop. The code then goes on to dereference `dump_addr`. Make the function print "Registers not stored" when it sees a NULL to solve this. Since we're touching the code, fix msm_disp_state_print_regs() not to pointlessly take a double-pointer and properly mark the pointer as `const`. Patchwork: https://patchwork.freedesktop.org/patch/619657/
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 98659487b845c05b6bed85d881713545db674c7c before 42cf045086feae77b212f0f66e742b91a5b566b7, from 98659487b845c05b6bed85d881713545db674c7c before e8e9f2a12a6214080c8ea83220a596f6e1dedc6c, from 98659487b845c05b6bed85d881713545db674c7c before f7ad916273483748582d97cfa31054ccb19224f3, from 98659487b845c05b6bed85d881713545db674c7c before 563aa81fd66a4e7e6e551a0e02bcc23957cafe2f, from 98659487b845c05b6bed85d881713545db674c7c before 293f53263266bc4340d777268ab4328a97f041fa, 5.14 Not affected: before 5.14, from 5.15.170 up to 5.15.*, from 6.1.115 up to 6.1.*, from 6.6.59 up to 6.6.*, from 6.11.6 up to 6.11.*, from 6.12 up to * | CVE List |
| linux linux_kernel | from 5.14 before 5.15.170, from 5.16 before 6.1.115, from 6.2 before 6.6.59, from 6.7 before 6.11.6, 6.12 | NVD |
All scores
| CISA-ADP | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
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/msm: Avoid NULL dereference in msm_disp_state_print_regs() If the allocation in msm_disp_state_dump_regs() failed then `block->state` can be NULL. The msm_disp_state_print_regs() function _does_ have code to try to handle it with: if (*reg) dump_addr = *reg; ...but since "dump_addr" is initialized to NULL the above is actually a noop. The code then goes on to dereference `dump_addr`. Make the function print "Registers not stored" when it sees a NULL to solve this. Since we're touching the code, fix msm_disp_state_print_regs() not to pointlessly take a double-pointer and properly mark the pointer as `const`. Patchwork: https://patchwork.freedesktop.org/patch/619657/
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/msm: Evitar la desreferenciación NULL en msm_disp_state_print_regs() Si la asignación en msm_disp_state_dump_regs() falla, entonces `block->state` puede ser NULL. La función msm_disp_state_print_regs() _sí_ tiene código para intentar manejarlo con: if (*reg) dump_addr = *reg; ...pero como "dump_addr" se inicializa a NULL, lo anterior es en realidad un noop. Luego, el código continúa para desreferenciar `dump_addr`. Haga que la función imprima "Registros no almacenados" cuando vea un NULL para resolver esto. Ya que estamos tocando el código, arregle msm_disp_state_print_regs() para que no tome un puntero doble sin sentido y marque correctamente el puntero como `const`. Parche: https://patchwork.freedesktop.org/patch/619657/
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-50156 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2024-50156 changed 2026-06-17 | Public domain |