Files
vuln-cve/data/2025/40xxx/CVE-2025-40354.json
T

161 lines
8.7 KiB
JSON

{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2025-40354",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2025-04-16T07:20:57.187Z",
"datePublished": "2025-12-16T13:30:27.082Z",
"dateUpdated": "2026-08-05T12:09:51.348Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T12:09:51.348Z"
},
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: increase max link count and fix link->enc NULL pointer access\n\n[why]\n1.) dc->links[MAX_LINKS] array size smaller than actual requested.\nmax_connector + max_dpia + 4 virtual = 14.\nincrease from 12 to 14.\n\n2.) hw_init() access null LINK_ENC for dpia non display_endpoint.\n\n(cherry picked from commit d7f5a61e1b04ed87b008c8d327649d184dc5bb45)"
}
],
"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 defect is in the amdgpu DC display driver's hardware-init path, reached through local driver probe and suspend/resume (including runtime-PM resume driven by opening /dev/dri/renderD*). There is no network-facing component.\nAC:L - Both the unbounded `dc->links[]` append in create_links() and the NULL `link->link_enc` dereference for DPIA endpoints are deterministic on affected DCN4x configurations — no race to win and no memory layout beyond the attacker's influence.\nPR:L - The vulnerable init_hw path is re-entered on every runtime-PM/system resume via dm_resume() -> dc_set_power_state(D0), which an unprivileged local user holding an ordinary DRM/render node handle can drive repeatedly; no root or CAP_SYS_ADMIN is required.\nUI:N - No victim action is needed — the corrupting create_links() loop runs at driver init and the NULL dereference is hit automatically on each hardware init/resume cycle.\nS:U - The out-of-bounds write and NULL dereference stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Overflowing dc->links[] overwrites the adjacent `struct link_service *link_srv`, `current_state`, and `res_pool` pointers in struct dc, so subsequent dc->link_srv->...() dispatches read from an attacker-influenceable heap object, yielding pointer confusion and arbitrary kernel-memory read primitives.\nI:H - This is an out-of-bounds write of pointer values past a fixed array directly onto a function-pointer-table pointer (link_srv), giving a realistic indirect-call hijack and arbitrary write path rather than a bounded corruption.\nA:H - The unfixed DPIA path dereferences a NULL link->link_enc in dcn401_init_hw(), producing a kernel oops on every hardware init/resume, and the adjacent-field corruption reliably panics the machine."
}
]
}
],
"affected": [
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "unaffected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c",
"drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h"
],
"versions": [
{
"version": "4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c",
"lessThan": "f28092be4e12b7df9e4f415d25bf0d767bc2d9ed",
"status": "affected",
"versionType": "git"
},
{
"version": "4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c",
"lessThan": "a3fc0d36cfb927f8986b83bf5fba47dbedad3c63",
"status": "affected",
"versionType": "git"
},
{
"version": "4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c",
"lessThan": "bec947cbe9a65783adb475a5fb47980d7b4f4796",
"status": "affected",
"versionType": "git"
}
]
},
{
"product": "Linux",
"vendor": "Linux",
"defaultStatus": "affected",
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"programFiles": [
"drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c",
"drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h"
],
"versions": [
{
"version": "4.15",
"status": "affected"
},
{
"version": "0",
"lessThan": "4.15",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.12.56",
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.17.6",
"lessThanOrEqual": "6.17.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.18",
"lessThanOrEqual": "*",
"status": "unaffected",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "4.15",
"versionEndExcluding": "6.12.56"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "4.15",
"versionEndExcluding": "6.17.6"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "4.15",
"versionEndExcluding": "6.18"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/f28092be4e12b7df9e4f415d25bf0d767bc2d9ed"
},
{
"url": "https://git.kernel.org/stable/c/a3fc0d36cfb927f8986b83bf5fba47dbedad3c63"
},
{
"url": "https://git.kernel.org/stable/c/bec947cbe9a65783adb475a5fb47980d7b4f4796"
}
],
"title": "drm/amd/display: increase max link count and fix link->enc NULL pointer access",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
}
}