# CVE-2024-26797: drm/amd/display: Prevent potential buffer overflow in map_hw_resources

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2024-04-04T08:20:26.558Z
- Modified: 2026-08-05T11:27:19.496Z
- Weaknesses: CWE-120
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/amd/display: Prevent potential buffer overflow in map_hw_resources

Adds a check in the map_hw_resources function to prevent a potential
buffer overflow. The function was accessing arrays using an index that
could potentially be greater than the size of the arrays, leading to a
buffer overflow.

Adds a check to ensure that the index is within the bounds of the
arrays. If the index is out of bounds, an error message is printed and
break it will continue execution with just ignoring extra data early to
prevent the buffer overflow.

Reported by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_wrapper.c:79 map_hw_resources() error: buffer overflow 'dml2->v20.scratch.dml_to_dc_pipe_mapping.disp_cfg_to_stream_id' 6 <= 7
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_wrapper.c:81 map_hw_resources() error: buffer overflow 'dml2->v20.scratch.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id' 6 <= 7

(As written by CVE List.)

## Affected

- Linux Linux: from 7966f319c66d9468623c6a6a017ecbc0dd79be75 before 50a6302cf881f67f1410461a68fe9eabd00ff31d; from 7966f319c66d9468623c6a6a017ecbc0dd79be75 before 0f8ca019544a252d1afb468ce840c6dcbac73af4; 6.7 (not affected: before 6.7; from 6.7.9 up to 6.7.*; from 6.8 up to *)
- linux linux_kernel: from 7966f319c66d before 50a6302cf881; from 7966f319c66d before 0f8ca019544a; 6.7; from 6.7 before 6.7.9; 6.8 (not affected: before 6.7; from 6.79 up to 6.8; from 6.8 up to *)

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/50a6302cf881f67f1410461a68fe9eabd00ff31d> (patch)
- <https://git.kernel.org/stable/c/0f8ca019544a252d1afb468ce840c6dcbac73af4> (patch)

## Sources

- CVE List: [CVE-2024-26797](https://www.cve.org/CVERecord?id=CVE-2024-26797), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-26797](https://nvd.nist.gov/vuln/detail/CVE-2024-26797), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-26797 · Whole record: https://cve.day/CVE-2024-26797.json · Rebuilt by cve.day 2026-11-25T22:58:38.745Z
