{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99866","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.439Z","datePublished":"2026-11-30T13:17:47.489Z","dateUpdated":"2026-12-01T05:43:56.334Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:43:56.334Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: drop the gang leader reference when freeing gang jobs\n\nEvery job of a gang except the leader holds a reference to the\nscheduled fence of the leader in job->gang_submit. Only\namdgpu_job_free(), used for jobs which never ran, drops it, so for every\ngang submission which completes the scheduler fence of the leader, and\nwith it its hardware fence, is leaked. amdgpu_job_free() in turn checks\nfor the leader only after drm_sched_job_cleanup() cleared the scheduler\nfence, so a leader freed there drops a reference it never took.\n\nOn navi31, 100 submissions of a GFX + COMPUTE gang grow the slab cache\ndrm_sched_fence is merged into by 60 to 180 objects each time, while\n100 GFX only submissions don't.\n\nUse amdgpu_job_free() for the jobs the scheduler frees too, and check\nfor the gang leader there before drm_sched_job_cleanup() clears the\nscheduler fence. As the scheduler clears the entity of the jobs it\npicked up, check for the scheduler fence instead to tell whether the job\nneeds cleaning up.\n\nKeep freeing the remaining IBs with amdgpu_job_free_resources() after\ndrm_sched_job_cleanup(), so that it frees them with the hardware fence or\nright away and not with the scheduler fence, which nobody signals for\njobs aborted after drm_sched_job_arm(), like a CS returning -EAGAIN.\n\nv2: unify amdgpu_job_free() and amdgpu_job_free_cb() (Christian), don't\n    free the remaining IBs with the scheduler fence\nv3: drop the comments (Christian)\nv4: free the IBs with amdgpu_job_free_resources() again (Christian)\n\n(cherry picked from commit df4d6d404d44bbc8fc850bc7f9f136a25dabf180)"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Both defects are in amdgpu_job_free()/amdgpu_job_free_cb(), reached only from DRM_IOCTL_AMDGPU_CS on the local render node (amdgpu_cs_ioctl -> amdgpu_cs_submit -> amdgpu_cs_parser_fini, or the scheduler's free_job for completed gang jobs); no remote peer supplies any input.\nAC:H - The leak is deterministic, but corruption needs the CS -EAGAIN abort after amdgpu_job_set_gang_leader() (forced by invalidating the attacker's own userptr BO). With leader=jobs[0] (IB chunks GFX,COMPUTE,GFX) the leader's extra dma_fence_put() call_rcu-frees its drm_sched_fence while jobs[1] still holds gang_submit; the stale put microseconds later hits reused memory only if the thread is preempted across a whole RCU grace period.\nPR:L - DRM_IOCTL_AMDGPU_CS and DRM_IOCTL_AMDGPU_GEM_USERPTR are DRM_AUTH|DRM_RENDER_ALLOW with no capability check, so any user able to open /dev/dri/renderD* (render group or seat uaccess) can submit a multi-entity gang of up to AMDGPU_CS_GANG_SIZE jobs.\nUI:N - The attacker's own process issues the gang CS ioctls and races munmap/madvise against its own userptr BO; no other user has to act.\nS:U - The leaked and prematurely freed drm_sched_fence objects are kernel slab memory under the same kernel authority; no GPU, IOMMU or VM boundary is crossed.\nC:H - If the RCU-freed drm_sched_fence slot is reallocated by the attacker's next CS, the stale put decrements that live fence's scheduled refcount and frees a finished fence still installed in dma_resv/syncobjs; reclaiming it lets SYNCOBJ/sync_file ioctls read through the dangling dma_fence.\nI:H - The same premature free leaves a live dma_fence whose ops pointer and cb_list come from reclaimed memory; dma_fence_signal()/dma_fence_release() write through cb_list and call ops->release, giving write and control-flow primitives.\nA:H - Every completed gang leaks the leader's drm_sched_fence (slab without SLAB_ACCOUNT) plus the hw fence it pins (the whole amdgpu_job on trees embedding hw_fence), so an unprivileged loop exhausts memory past memcg limits; the -EAGAIN path also hits a refcount_t underflow WARN."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_job.c"],"versions":[{"version":"68ce8b242242651eb3cb4ff29b79c44d02f752c9","lessThan":"94f67beb15993066c97bd31d9c176b9fe00a9df9","status":"affected","versionType":"git"},{"version":"68ce8b242242651eb3cb4ff29b79c44d02f752c9","lessThan":"5027839fd02b107d50a8fcbdb75b37c885f68a32","status":"affected","versionType":"git"},{"version":"68ce8b242242651eb3cb4ff29b79c44d02f752c9","lessThan":"022471384f88d86c68f08de7bfeb9fbd6cc3c75c","status":"affected","versionType":"git"},{"version":"68ce8b242242651eb3cb4ff29b79c44d02f752c9","lessThan":"b83464af4ddd549c2998d52f04fda6910de521ed","status":"affected","versionType":"git"},{"version":"68ce8b242242651eb3cb4ff29b79c44d02f752c9","lessThan":"c82c35882df4424f28dbcff1605d7211e41de767","status":"affected","versionType":"git"},{"version":"68ce8b242242651eb3cb4ff29b79c44d02f752c9","lessThan":"c1584e10a7deb655438f21867b2b7a356a9aaf9f","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_job.c"],"versions":[{"version":"6.1","status":"affected"},{"version":"0","lessThan":"6.1","status":"unaffected","versionType":"semver"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.119","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/94f67beb15993066c97bd31d9c176b9fe00a9df9"},{"url":"https://git.kernel.org/stable/c/5027839fd02b107d50a8fcbdb75b37c885f68a32"},{"url":"https://git.kernel.org/stable/c/022471384f88d86c68f08de7bfeb9fbd6cc3c75c"},{"url":"https://git.kernel.org/stable/c/b83464af4ddd549c2998d52f04fda6910de521ed"},{"url":"https://git.kernel.org/stable/c/c82c35882df4424f28dbcff1605d7211e41de767"},{"url":"https://git.kernel.org/stable/c/c1584e10a7deb655438f21867b2b7a356a9aaf9f"}],"title":"drm/amdgpu: drop the gang leader reference when freeing gang jobs","x_generator":{"engine":"bippy-1.2.0"}}}}