{"id":"CVE-2026-31766","state":"PUBLISHED","title":"drm/amdgpu: validate doorbell_offset in user queue creation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: validate doorbell_offset in user queue creation\n\namdgpu_userq_get_doorbell_index() passes the user-provided\ndoorbell_offset to amdgpu_doorbell_index_on_bar() without bounds\nchecking. An arbitrarily large doorbell_offset can cause the\ncalculated doorbell index to fall outside the allocated doorbell BO,\npotentially corrupting kernel doorbell space.\n\nValidate that doorbell_offset falls within the doorbell BO before\ncomputing the BAR index, using u64 arithmetic to prevent overflow.\n\n(cherry picked from commit de1ef4ffd70e1d15f0bf584fd22b1f28cbd5e2ec)","publishedAt":"2026-05-01T14:14:56.622Z","updatedAt":"2026-08-05T12:25:00.359Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f09c1e6077abd1bc2ddd2b97e1135215801ca7f9","status":"affected","lessThan":"3543005a42d7e8e12b21897ef6798541bf7cbcd3","versionType":"git"},{"version":"f09c1e6077abd1bc2ddd2b97e1135215801ca7f9","status":"affected","lessThan":"86b732fbc37ce4fb76cdd4af0fb7e30a6acdbce6","versionType":"git"},{"version":"f09c1e6077abd1bc2ddd2b97e1135215801ca7f9","status":"affected","lessThan":"a018d1819f158991b7308e4f74609c6c029b670c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.22","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.12","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","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/amdgpu/amdgpu_userq.c"]}],"references":["https://git.kernel.org/stable/c/3543005a42d7e8e12b21897ef6798541bf7cbcd3","https://git.kernel.org/stable/c/86b732fbc37ce4fb76cdd4af0fb7e30a6acdbce6","https://git.kernel.org/stable/c/a018d1819f158991b7308e4f74609c6c029b670c"],"weaknesses":[],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/31xxx/CVE-2026-31766.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-31766","state":"PUBLISHED","datePublished":"2026-05-01T14:14:56.622Z","dateUpdated":"2026-08-05T12:25:00.359Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-03-09T15:48:24.140Z"},"containers":{"cna":{"title":"drm/amdgpu: validate doorbell_offset in user queue creation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: validate doorbell_offset in user queue creation\n\namdgpu_userq_get_doorbell_index() passes the user-provided\ndoorbell_offset to amdgpu_doorbell_index_on_bar() without bounds\nchecking. An arbitrarily large doorbell_offset can cause the\ncalculated doorbell index to fall outside the allocated doorbell BO,\npotentially corrupting kernel doorbell space.\n\nValidate that doorbell_offset falls within the doorbell BO before\ncomputing the BAR index, using u64 arithmetic to prevent overflow.\n\n(cherry picked from commit de1ef4ffd70e1d15f0bf584fd22b1f28cbd5e2ec)"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f09c1e6077abd1bc2ddd2b97e1135215801ca7f9","status":"affected","lessThan":"3543005a42d7e8e12b21897ef6798541bf7cbcd3","versionType":"git"},{"version":"f09c1e6077abd1bc2ddd2b97e1135215801ca7f9","status":"affected","lessThan":"86b732fbc37ce4fb76cdd4af0fb7e30a6acdbce6","versionType":"git"},{"version":"f09c1e6077abd1bc2ddd2b97e1135215801ca7f9","status":"affected","lessThan":"a018d1819f158991b7308e4f74609c6c029b670c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.22","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.12","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","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/amdgpu/amdgpu_userq.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/3543005a42d7e8e12b21897ef6798541bf7cbcd3"},{"url":"https://git.kernel.org/stable/c/86b732fbc37ce4fb76cdd4af0fb7e30a6acdbce6"},{"url":"https://git.kernel.org/stable/c/a018d1819f158991b7308e4f74609c6c029b670c"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is reached through the local AMDGPU DRM USERQ ioctl on a render-capable device, not through network or physical input.\nAC:L - The attacker directly controls the doorbell GEM handle and doorbell_offset in queue creation; no race or external timing condition is required.\nPR:L - A local unprivileged process with access to the AMDGPU render node can create normal user queues; the optional high-priority path is not required.\nUI:N - Exploitation is performed by the attacking process issuing ioctls and does not require another user to take action.\nS:U - The impact remains within the local kernel/GPU driver security authority and does not by itself cross a VM, IOMMU, or sandbox boundary.\nC:N - The unchecked value corrupts or aliases doorbell MMIO selector state; I found no direct path that exposes kernel memory or sensitive data.\nI:H - The attacker can cause a user queue to use a doorbell index outside its allocated doorbell BO, potentially corrupting kernel-controlled doorbell space and queue state.\nA:H - Misprogrammed or corrupted doorbells can wedge queues, trigger GPU reset paths, or destabilize the driver, causing high availability impact."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:25:00.359Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18.22"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.19.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}