{"id":"CVE-2024-42117","state":"PUBLISHED","title":"drm/amd/display: ASSERT when failing to find index by plane/stream id","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: ASSERT when failing to find index by plane/stream id\n\n[WHY]\nfind_disp_cfg_idx_by_plane_id and find_disp_cfg_idx_by_stream_id returns\nan array index and they return -1 when not found; however, -1 is not a\nvalid index number.\n\n[HOW]\nWhen this happens, call ASSERT(), and return a positive number (which is\nfewer than callers' array size) instead.\n\nThis fixes 4 OVERRUN and 2 NEGATIVE_RETURNS issues reported by Coverity.","publishedAt":"2024-07-30T07:46:09.648Z","updatedAt":"2026-08-05T11:35:46.481Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7966f319c66d9468623c6a6a017ecbc0dd79be75","status":"affected","lessThan":"a9c047a5cf3135b8b66bd28fbe2c698b9cace0b3","versionType":"git"},{"version":"7966f319c66d9468623c6a6a017ecbc0dd79be75","status":"affected","lessThan":"01eb50e53c1ce505bf449348d433181310288765","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.9.9","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c"]}],"references":["https://git.kernel.org/stable/c/a9c047a5cf3135b8b66bd28fbe2c698b9cace0b3","https://git.kernel.org/stable/c/01eb50e53c1ce505bf449348d433181310288765"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:47.831Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/42xxx/CVE-2024-42117.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-42117","state":"PUBLISHED","datePublished":"2024-07-30T07:46:09.648Z","dateUpdated":"2026-08-05T11:35:46.481Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-07-29T15:50:41.178Z"},"containers":{"cna":{"title":"drm/amd/display: ASSERT when failing to find index by plane/stream id","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: ASSERT when failing to find index by plane/stream id\n\n[WHY]\nfind_disp_cfg_idx_by_plane_id and find_disp_cfg_idx_by_stream_id returns\nan array index and they return -1 when not found; however, -1 is not a\nvalid index number.\n\n[HOW]\nWhen this happens, call ASSERT(), and return a positive number (which is\nfewer than callers' array size) instead.\n\nThis fixes 4 OVERRUN and 2 NEGATIVE_RETURNS issues reported by Coverity."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7966f319c66d9468623c6a6a017ecbc0dd79be75","status":"affected","lessThan":"a9c047a5cf3135b8b66bd28fbe2c698b9cace0b3","versionType":"git"},{"version":"7966f319c66d9468623c6a6a017ecbc0dd79be75","status":"affected","lessThan":"01eb50e53c1ce505bf449348d433181310288765","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.9.9","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a9c047a5cf3135b8b66bd28fbe2c698b9cace0b3"},{"url":"https://git.kernel.org/stable/c/01eb50e53c1ce505bf449348d433181310288765"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is in the amdgpu DC display pipeline mapper, reached only through local DRM ioctls (`DRM_IOCTL_MODE_ATOMIC`, `SETPLANE`, `PAGE_FLIP`) on `/dev/dri/card*`. There is no network or adjacent-network path to `dml2_map_dc_pipes()`.\nAC:L - There is no race, no timing window, and no memory-layout condition outside the attacker's control — the attacker directly supplies the stream/plane/ODM configuration in the atomic commit that desynchronizes the 6-entry `disp_cfg_to_*_id` mapping table, and the failed lookup then deterministically yields `0xFFFFFFFF` as an array index.\nPR:L - The path requires only DRM master on the card node, which systemd-logind grants to the ordinary unprivileged user owning the active graphical session; no root, no CAP_SYS_ADMIN, and no capability in the init namespace is needed.\nUI:N - The attacker performs the atomic modeset/plane commit themselves from their own process; no victim action, no filesystem mount, and no file open by another user is involved.\nS:U - The out-of-bounds read and the resulting stack corruption stay within the kernel's own memory and the amdgpu driver's security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `ODMMode[0xFFFFFFFF]` and `DPPPerSurface[0xFFFFFFFF]` read roughly 16 GB beyond the display-config arrays, an entirely unbounded out-of-bounds read whose value is then propagated into driver state and observable pipe/ODM behavior, giving disclosure of arbitrary kernel memory contents.\nI:H - The OOB-read value becomes `mpc_factor`, which bounds the write loop `pipe_pool->pipes_assigned_to_plane[odm_slice][mpc_slice] = pipes[next_pipe_to_assign++]` over a `int[4][4]` field of a stack-allocated `struct dc_pipe_mapping_scratch`, producing an out-of-bounds kernel stack write and a subsequent OOB index into `res_ctx.pipe_ctx[]` — corruption of that class is exploitable for control-flow hijacking.\nA:H - The ~16 GB-offset dereference lands in unmapped kernel address space in the common case, causing an immediate oops, and the follow-on stack overflow reliably panics the machine; the affected code runs during every display commit, so the crash is trivially repeatable."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:35:46.481Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.9.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/a9c047a5cf3135b8b66bd28fbe2c698b9cace0b3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/01eb50e53c1ce505bf449348d433181310288765","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:54:32.225Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-42117","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T16:17:10.514634Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:05.771Z"}}]}}}