CVE-2026-99871: drm/amdgpu: guard VCE/UVD sched entity teardown on failed probe

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

drm/amdgpu: guard VCE/UVD sched entity teardown on failed probe

Since commit 037b98a2312e ("drm/amdgpu: move UVD and VCE sched entity init after sched init"), drmschedentityinit() for the VCE and UVD kernel entities runs in the scheduler-init phase, well after the IP-block swinit phase has allocated the vcpubos.

If probe fails between the two phases, amdgpudevicefinisw() still runs the per-IP swfini callbacks for blocks that did complete swinit. Both amdgpuvceswfini() and amdgpuuvdswfini() then call drmschedentitydestroy() on an entity that was never initialized: entity->rq is NULL and drmschedentityflush() dereferences it, oopsing in whatever context drove the failed probe.

The hole was latent-but-safe until commit 2df5efb45425 ("drm/sched: Remove redundant entity->rq initialization and checks") removed the if (!entity->rq) early return that commit 1decbf6bb0b4 ("drm/sched: Fix entities with 0 rqs.") had put in drmschedentityflush(), on the grounds that entity->rq can never be NULL. That holds only for entities that completed drmschedentityinit() — not for the never-initialized entity this teardown path reaches.

Observed on real hardware: MI50 (Vega20, VCE 4.0 / UVD 7.2) behind a Thunderbolt link — a pciehp presence/link-change event re-probes the device; when the re-probe fails (-EINVAL here), the cleanup path NULL-derefs inside drmschedentityflush() in the pciehp IRQ thread and takes the whole machine down (paniconoops, EFI pstore capture). Reproduced twice on 7.3-rc5, 2026-10-06 and 2026-10-09, identical signature; the faulting instruction is mov (%rax),%r15 on rax = entity->rq == NULL, i.e. sched = entity->rq->sched:

BUG: kernel NULL pointer dereference RIP: drmschedentityflush+0x34/0x2d0 [gpusched] drmschedentitydestroy amdgpuvceswfini vcev40swfini amdgpudevicefinisw ... pciehpconfiguredevice pciehphandlepresenceorlinkchange

Guard the entity teardown on entity->rq, which is set only by drmschedentityinit(). amdgpuringfini() already self-guards via the rings[] registration, and the vcpubo/firmware cleanup still runs as before.

v2: retarget Fixes: at commit 2df5efb45425 ("drm/sched: Remove redundant entity->rq initialization and checks") — the !entity->rq check from commit 1decbf6bb0b4 ("drm/sched: Fix entities with 0 rqs.") that Alex pointed to was removed by it in the 7.3 window, so this is a regression there, not a pre-existing hole.

(cherry picked from commit 3ad55d18f468fa81be725301d1e138ecd5148e6a)

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 3ad55d18f468fa81be725301d1e138ecd5148e6a

Event History

Nov 30, 2026
CVE Published
via MITRE·01:17 PM
Data Sourced
via MITRE·01:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203