# CVE-2024-42118: drm/amd/display: Do not return negative stream id for array

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `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.24%, higher than 15% of CVEs (2026-12-01)
- Published: 2024-07-30T07:46:10.486Z
- Modified: 2026-06-17T07:48:52.380Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

drm/amd/display: Do not return negative stream id for array

[WHY]
resource_stream_to_stream_idx returns an array index and it return -1
when not found; however, -1 is not a valid array index number.

[HOW]
When this happens, call ASSERT(), and return a zero instead.

This fixes an OVERRUN and an NEGATIVE_RETURNS issues reported by Coverity.

(As written by CVE List.)

## Affected

- Linux Linux: from 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c before a76fa9c4f0fc0aa6f517da3fa7d7c23e8a32c7d0; from 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c before 3ac31c9a707dd1c7c890b95333182f955e9dcb57; 4.15 (not affected: before 4.15; from 6.9.9 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 4.15 before 6.9.9

## References

- <https://git.kernel.org/stable/c/a76fa9c4f0fc0aa6f517da3fa7d7c23e8a32c7d0> (patch)
- <https://git.kernel.org/stable/c/3ac31c9a707dd1c7c890b95333182f955e9dcb57> (patch)

## Sources

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

---

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