{"id":"CVE-2026-72095","state":"PUBLISHED","title":"dma-fence: Make dma_fence_dedup_array() robust against 0-count input","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndma-fence: Make dma_fence_dedup_array() robust against 0-count input\n\ndma_fence_dedup_array() returns 1 when called with num_fences == 0:\nthe for-loop body never executes, j stays at 0, and the final\n`return ++j` yields 1. This contradicts both the kernel-doc (\"Return:\nNumber of unique fences remaining in the array\") and the natural\nexpectation that 0 input gives 0 output.\n\nThe caller __dma_fence_unwrap_merge() bails out via the\n`if (count == 0 || count == 1)` fast path and so is save.\n\nBut amdgpu_userq_wait_*() could reach the dedup call with a zero local\ncount and dereference an uninitialized fence slot in the array.\n\nMake the contract match the documentation by returning 0 early. This\nalso skips an unnecessary sort() call on an empty array.","publishedAt":"2026-08-15T05:52:41.470Z","updatedAt":"2026-10-19T21:19:27.366Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"575ec9b0c2f11f40535ea737ed5a64792780d1ef","status":"affected","lessThan":"7aa8f3dba53422465dbe1be8dbb7240304462bb2","versionType":"git"},{"version":"575ec9b0c2f11f40535ea737ed5a64792780d1ef","status":"affected","lessThan":"e2d9a2ea178a5da0b4a6693e8ebca5c7fc4d7051","versionType":"git"},{"version":"575ec9b0c2f11f40535ea737ed5a64792780d1ef","status":"affected","lessThan":"77a9298741f8f9e8b963c977f5582ab21c6d3427","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-fence-unwrap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-fence-unwrap.c"]}],"references":["https://git.kernel.org/stable/c/7aa8f3dba53422465dbe1be8dbb7240304462bb2","https://git.kernel.org/stable/c/e2d9a2ea178a5da0b4a6693e8ebca5c7fc4d7051","https://git.kernel.org/stable/c/77a9298741f8f9e8b963c977f5582ab21c6d3427"],"weaknesses":["CWE-170"],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/72xxx/CVE-2026-72095.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-72095","state":"PUBLISHED","datePublished":"2026-08-15T05:52:41.470Z","dateUpdated":"2026-10-19T21:19:27.366Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-09T03:40:39.905Z"},"containers":{"cna":{"title":"dma-fence: Make dma_fence_dedup_array() robust against 0-count input","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndma-fence: Make dma_fence_dedup_array() robust against 0-count input\n\ndma_fence_dedup_array() returns 1 when called with num_fences == 0:\nthe for-loop body never executes, j stays at 0, and the final\n`return ++j` yields 1. This contradicts both the kernel-doc (\"Return:\nNumber of unique fences remaining in the array\") and the natural\nexpectation that 0 input gives 0 output.\n\nThe caller __dma_fence_unwrap_merge() bails out via the\n`if (count == 0 || count == 1)` fast path and so is save.\n\nBut amdgpu_userq_wait_*() could reach the dedup call with a zero local\ncount and dereference an uninitialized fence slot in the array.\n\nMake the contract match the documentation by returning 0 early. This\nalso skips an unnecessary sort() call on an empty array."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"575ec9b0c2f11f40535ea737ed5a64792780d1ef","status":"affected","lessThan":"7aa8f3dba53422465dbe1be8dbb7240304462bb2","versionType":"git"},{"version":"575ec9b0c2f11f40535ea737ed5a64792780d1ef","status":"affected","lessThan":"e2d9a2ea178a5da0b4a6693e8ebca5c7fc4d7051","versionType":"git"},{"version":"575ec9b0c2f11f40535ea737ed5a64792780d1ef","status":"affected","lessThan":"77a9298741f8f9e8b963c977f5582ab21c6d3427","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-fence-unwrap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma-buf/dma-fence-unwrap.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/7aa8f3dba53422465dbe1be8dbb7240304462bb2"},{"url":"https://git.kernel.org/stable/c/e2d9a2ea178a5da0b4a6693e8ebca5c7fc4d7051"},{"url":"https://git.kernel.org/stable/c/77a9298741f8f9e8b963c977f5582ab21c6d3427"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached only via the AMDGPU_USERQ_WAIT DRM ioctl on /dev/dri/renderD*, requiring local access to an AMD GPU render node; it is not reachable from network protocols or remote packet handling.\nAC:L - An attacker with render-node access can reliably trigger the bug by creating a userq, calling AMDGPU_USERQ_WAIT with num_fences>0 and zero syncobj/BO handles so local num_fences stays 0 and dma_fence_dedup_array() incorrectly returns 1.\nPR:L - Exploitation requires only an authenticated DRM client on a render node (DRM_AUTH|DRM_RENDER_ALLOW), which unprivileged users commonly obtain via the render group on workstations, cloud GPU instances, and shared compute nodes.\nUI:N - No victim interaction is required; the attacker drives the vulnerable AMDGPU_USERQ_WAIT ioctl directly after creating their own user queue.\nS:U - Impact remains within the host kernel security domain (local privilege escalation/DoS on the GPU server); it does not cross VM, container, or IOMMU boundaries.\nC:H - When num_fences is 0 the dedup helper returns 1, causing iteration over uninitialized kmalloc slots whose stale contents are then dereferenced via to_amdgpu_userq_fence()/dma_fence_wait(), enabling kernel memory reads and pointer disclosure.\nI:H - The uninitialized fences[0] pointer is passed into dma_fence_enable_sw_signaling() and dma_fence_wait(), which invoke fence ops and locking on attacker-influenced addresses, creating a plausible path to control-flow hijacking via heap grooming.\nA:H - Dereferencing an uninitialized or attacker-influenced dma_fence pointer in kernel context can cause an oops, BUG, or panic, producing a repeatable local denial of service on affected AMDGPU userq systems."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T05:40:12.383Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-72095","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:51:46.940002Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-170","lang":"en","type":"CWE","description":"CWE-170 Improper Null Termination"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T21:19:27.366Z"}}]}}}