drm/amd/display: Do not return negative stream id for array
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.9.9
- CVEs
- CVE-2024-42118
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 19:04 UTC · Revision 1
Source evidence
drm/amd/display: Do not return negative stream id for array
core-osv · Original sourcePublished 30 Jul 2024, 07:46 UTC
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.
osv:CVE-2024-42118
Kernel
Fixed versions: 6.9.9
Complete source record
{
"id": "13990523c82c1c1b148fdd36c6654b59944ba6605e826e5fbf1ca5aa8e2c23ed",
"url": "https://osv.dev/vulnerability/CVE-2024-42118",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "drm/amd/display: Do not return negative stream id for array",
"summary": "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.",
"evidence": "osv:CVE-2024-42118",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.9.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2024-42118",
"aliases": [
"CVE-2024-42118"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c"
},
{
"fixed": "a76fa9c4f0fc0aa6f517da3fa7d7c23e8a32c7d0"
},
{
"fixed": "3ac31c9a707dd1c7c890b95333182f955e9dcb57"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42118.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "6.9.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42118.json"
}
}
],
"modified": "2026-10-28T02:30:38.848327453Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/3ac31c9a707dd1c7c890b95333182f955e9dcb57",
"https://git.kernel.org/stable/c/a76fa9c4f0fc0aa6f517da3fa7d7c23e8a32c7d0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42118.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-42118",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42118.json"
}
},
"related_cves": [
{
"value": "CVE-2024-42118",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 505977,
"published_at": "2024-07-30T07:46:10.486+00:00"
}