Skip to contentSkip to conversation

CVE-2026-31766: drm/amdgpu: validate doorbell_offset in user queue creation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 1

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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)

The Linux kernel CVE team has assigned CVE-2026-31766 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.16 with commit f09c1e6077abd1bc2ddd2b97e1135215801ca7f9 and fixed in 6.18.22 with commit 3543005a42d7e8e12b21897ef6798541bf7cbcd3
	Issue introduced in 6.16 with commit f09c1e6077abd1bc2ddd2b97e1135215801ca7f9 and fixed in 6.19.12 with commit 86b732fbc37ce4fb76cdd4af0fb7e30a6acdbce6
	Issue introduced in 6.16 with commit f09c1e6077abd1bc2ddd2b97e1135215801ca7f9 and fixed in 7.0 with commit a018d1819f158991b7308e4f74609c6c029b670c

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-31766

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/3543005a42d7e8e12b21897ef6798541bf7cbcd3
	https://git.kernel.org/stable/c/86b732fbc37ce4fb76cdd4af0fb7e30a6acdbce6
	https://git.kernel.org/stable/c/a018d1819f158991b7308e4f74609c6c029b670c