Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-99986

published high CVSS 3.1 · 7.8

drm/amdkfd: fix doorbell allocation race creating duplicate allocations

Published
30 Nov 2026, 13:18:54 UTC
Updated
01 Dec 2026, 05:44:32 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux16f0013157bf8c95d10b9360491e3c920f85641e to < 99dfb16dd7cbe0e0c298b65e099e8d5b93ad8ac5 · 16f0013157bf8c95d10b9360491e3c920f85641e to < f56f23b99d67b523c7b92ee0385851de079bbafe · 16f0013157bf8c95d10b9360491e3c920f85641e to < 8b1cb368bce3a3a670e36b82372aa0033ffe3d85 · 16f0013157bf8c95d10b9360491e3c920f85641e to < 2081dc291247066cf174f9ad4b20eaffc5663dc0 · 16f0013157bf8c95d10b9360491e3c920f85641e to < 84d62591d343e1aa2c045cf4c5f079eee4500da7 · 16f0013157bf8c95d10b9360491e3c920f85641e to < bebad45050945a3d668d6701fb77ae2571c5d44b · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.1 (affected) · 0 to < 6.1 (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: fix doorbell allocation race creating duplicate allocations The check-and-allocate sequence on pdd->qpd.proc_doorbells is lockless at every call site of kfd_alloc_process_doorbells(): kfd_get_process_doorbells() (mmap of /dev/kfd), kfd_ioctl_create_queue() and the CRIU restore path each test the pointer under different locking (or none), so two racing threads can both observe NULL and each allocate a doorbell BO and bitmap, orphaning one allocation and handing the two mappings different backing pages. Move the serialization into kfd_alloc_process_doorbells() itself, using a new per-process-device mutex so all three call sites are covered regardless of their own locking. The device-global kfd->doorbell_mutex is not suitable here: it is acquired under dqm->lock on the kernel-doorbell path (start_cpsch() -> pm_init() -> kq_initialize() -> kfd_get_kernel_doorbell()), so holding it across the sleeping allocations above would create a lock-ordering inversion with dqm->lock via TTM eviction, and it would also serialize doorbell setup of unrelated processes behind a device-wide lock for per-process state. This issue was discovered by Tencent CodeBuddy Security. v3 (Felix Kuehling): - Removed unlocked check in kfd_get_process_doorbell flagged as problematic by Sashiko Bot. Fall back to the locked check inside kfd_alloc_process_doorbells - Added missing mutex_destroy v4 (Felix Kuehling): - Removed unlocked checks around other kfd_alloc_process_doorbells calls (cherry picked from commit 4e27ba5ad5f76932d4f6cbacd25c81c2dd40ec4a)

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The racing callers are local syscalls on /dev/kfd: mmap() into kfd_doorbell_mmap()->kfd_get_process_doorbells(), and ioctl AMDKFD_IOC_CREATE_QUEUE or ALLOC_MEMORY_OF_GPU with KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL. Each checks qpd->proc_doorbells and calls kfd_alloc_process_doorbells() without a common lock. No network or adjacent input is involved. AC:L - The attacker controls both sides with two threads of its own process: the mmap path holds only mmap_lock and the ioctl path only p->mutex. The attacker also causes the amdgpu_bo_create() failure that puts both threads in the err: path, by filling the doorbell aperture with its own KFD processes or with BOs leaked by this race. Failed attempts are cheap retries in the same process. PR:L - /dev/kfd is accessible to the render group and the seat user (uaccess). kfd_ioctl gives CREATE_QUEUE and ALLOC_MEMORY_OF_GPU flag 0, and kfd_mmap only checks that the caller is the owning process. An ordinary GPU-compute user can reach the race without any capability; the cap-gated CRIU restore path is not needed. UI:N - The attacker opens /dev/kfd and runs both racing threads itself. No other user or administrator has to do anything. S:U - The corrupted objects are kernel-side: qpd->doorbell_bitmap (kmalloc-128) and the doorbell amdgpu_bo/TTM state, and they belong to the same kernel authority. No VM, IOMMU or sandbox boundary is crossed. C:H - kfd_alloc_process_doorbells' err: path does bitmap_free(qpd->doorbell_bitmap) and then stores NULL, with no lock. When both threads fail, both can free the same 128-byte bitmap. When one fails mid init_doorbell_bitmap() of the other, the other writes into freed memory. A kmalloc-128 double free or UAF can be groomed into a kernel read primitive. I:H - The same unlocked err:-path double free of qpd->doorbell_bitmap corrupts the slab freelist so that two owners get one object, and init_doorbell_bitmap() can set bits in a freed object. Separately, the reread of *bo_ptr in amdgpu_bo_create_reserved/create_kernel unreserves another BO's dma_resv lock. Together these give kernel heap corruption usable for control-flow hijack. A:H - Each duplicate amdgpu_bo_create() leaks a pinned doorbell BO whose BAR slice is never freed, so repeating the race starves every user's KFD queues until reboot. Narrower windows dereference NULL: amdgpu_bo_create zeroes *bo_ptr while the other thread uses it, or the bitmap is NULLed. Pin-count imbalance trips the pin_count WARN_ON_ONCE in ttm_bo_release.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 16f0013157bf8c95d10b9360491e3c920f85641e to < 99dfb16dd7cbe0e0c298b65e099e8d5b93ad8ac5 (affected · git)16f0013157bf8c95d10b9360491e3c920f85641e to < f56f23b99d67b523c7b92ee0385851de079bbafe (affected · git)16f0013157bf8c95d10b9360491e3c920f85641e to < 8b1cb368bce3a3a670e36b82372aa0033ffe3d85 (affected · git)16f0013157bf8c95d10b9360491e3c920f85641e to < 2081dc291247066cf174f9ad4b20eaffc5663dc0 (affected · git)16f0013157bf8c95d10b9360491e3c920f85641e to < 84d62591d343e1aa2c045cf4c5f079eee4500da7 (affected · git)16f0013157bf8c95d10b9360491e3c920f85641e to < bebad45050945a3d668d6701fb77ae2571c5d44b (affected · git)Default: unaffected Linux · cna
Linux Linux 6.1 (affected)0 to < 6.1 (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

6

Provider assertions

1

Linux · cna

drm/amdkfd: fix doorbell allocation race creating duplicate allocations

Provenance

Schema
5.2
Searchable
yes
Content hash
15e083871ec120382c1ea12abc1632131c1cdc15d8299270f25c44189625b8de
Ingested
01 Dec 2026, 05:47:23 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected