{"id":"CVE-2025-40191","state":"PUBLISHED","title":"drm/amdkfd: Fix kfd process ref leaking when userptr unmapping","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Fix kfd process ref leaking when userptr unmapping\n\nkfd_lookup_process_by_pid hold the kfd process reference to ensure it\ndoesn't get destroyed while sending the segfault event to user space.\n\nCalling kfd_lookup_process_by_pid as function parameter leaks the kfd\nprocess refcount and miss the NULL pointer check if app process is\nalready destroyed.","publishedAt":"2025-11-12T21:56:31.206Z","updatedAt":"2026-05-11T21:44:31.297Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2d274bf7099bc5e95fabaa93f23d0eb2977187ad","status":"affected","lessThan":"60f6112fc9b3ba0eae519f10702c0c13bab45742","versionType":"git"},{"version":"2d274bf7099bc5e95fabaa93f23d0eb2977187ad","status":"affected","lessThan":"58e6fc2fb94f0f409447e5d46cf6a417b6397fbc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.17.4","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c"]}],"references":["https://git.kernel.org/stable/c/60f6112fc9b3ba0eae519f10702c0c13bab45742","https://git.kernel.org/stable/c/58e6fc2fb94f0f409447e5d46cf6a417b6397fbc"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40191.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40191","state":"PUBLISHED","datePublished":"2025-11-12T21:56:31.206Z","dateUpdated":"2026-05-11T21:44:31.297Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.177Z"},"containers":{"cna":{"title":"drm/amdkfd: Fix kfd process ref leaking when userptr unmapping","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Fix kfd process ref leaking when userptr unmapping\n\nkfd_lookup_process_by_pid hold the kfd process reference to ensure it\ndoesn't get destroyed while sending the segfault event to user space.\n\nCalling kfd_lookup_process_by_pid as function parameter leaks the kfd\nprocess refcount and miss the NULL pointer check if app process is\nalready destroyed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2d274bf7099bc5e95fabaa93f23d0eb2977187ad","status":"affected","lessThan":"60f6112fc9b3ba0eae519f10702c0c13bab45742","versionType":"git"},{"version":"2d274bf7099bc5e95fabaa93f23d0eb2977187ad","status":"affected","lessThan":"58e6fc2fb94f0f409447e5d46cf6a417b6397fbc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.17.4","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/60f6112fc9b3ba0eae519f10702c0c13bab45742"},{"url":"https://git.kernel.org/stable/c/58e6fc2fb94f0f409447e5d46cf6a417b6397fbc"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:44:31.297Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.17.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}