CVE-2026-31766
Description
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: validate doorbell_offset in user queue creation
amdgpu_userq_get_doorbell_index() passes the user-provided doorbell_offset to amdgpu_doorbell_index_on_bar() without bounds checking. An arbitrarily large doorbell_offset can cause the calculated doorbell index to fall outside the allocated doorbell BO, potentially corrupting kernel doorbell space.
Validate that doorbell_offset falls within the doorbell BO before computing the BAR index, using u64 arithmetic to prevent overflow.
(cherry picked from commit de1ef4ffd70e1d15f0bf584fd22b1f28cbd5e2ec)
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A Linux kernel vulnerability in amdgpu lacks bounds-checking on user-provided doorbell_offset, enabling kernel memory corruption.
Root
Cause The vulnerability resides in the amdgpu_userq_get_doorbell_index() function of the AMDGPU kernel driver. When creating a user queue, the driver uses a user-supplied doorbell_offset to calculate an index into the doorbell BAR via amdgpu_doorbell_index_on_bar() without validating the offset against the allocated doorbell buffer object (BO) size. This missing bounds check means an attacker can supply an arbitrarily large offset, causing the computed index to exceed the BO boundary [1][3].
Exploitation
Prerequisites An attacker must have the ability to create a GPU user queue (amdgpu user queue) from userspace, which typically requires local access to the system and the ability to interact with the AMDGPU device driver (e.g., through appropriate device file permissions or via a container/VM with GPU passthrough). The attack leverages the unchecked user-controlled integer to cause the doorbell index to land outside the intended buffer [2].
Impact
By corrupting memory beyond the doorbell BO, the attacker can overwrite kernel doorbell space, which may lead to denial of service (system crash) or potentially privilege escalation, as the doorbell BAR region is used for GPU-to-host notifications. The corruption directly affects kernel memory integrity [1][3].
Mitigation
The patch (cherry-pick commit de1ef4ffd70e) introduces a validation check: it compares the user’s doorbell_offset against the size of the doorbell BO using u64 arithmetic to prevent overflow, and rejects offsets that exceed the bounds. The fix is part of the stable kernel tree and should be applied to affected kernels [2][3].
AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
8(expand)+ 7 more
- (no CPE)
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*range: >=6.16,<6.18.22
- cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
- cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
News mentions
0No linked articles in our index yet.