{"id":"CVE-2022-50354","state":"PUBLISHED","title":"drm/amdkfd: Fix kfd_process_device_init_vm error handling","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Fix kfd_process_device_init_vm error handling\n\nShould only destroy the ib_mem and let process cleanup worker to free\nthe outstanding BOs. Reset the pointer in pdd->qpd structure, to avoid\nNULL pointer access in process destroy worker.\n\n BUG: kernel NULL pointer dereference, address: 0000000000000010\n Call Trace:\n  amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel+0x46/0xb0 [amdgpu]\n  kfd_process_device_destroy_cwsr_dgpu+0x40/0x70 [amdgpu]\n  kfd_process_destroy_pdds+0x71/0x190 [amdgpu]\n  kfd_process_wq_release+0x2a2/0x3b0 [amdgpu]\n  process_one_work+0x2a1/0x600\n  worker_thread+0x39/0x3d0","publishedAt":"2025-09-17T14:56:07.596Z","updatedAt":"2026-08-05T08:58:20.719Z","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":"68df0f195a689bbb0f92bfeadee6edd90c79c31f","status":"affected","lessThan":"b6e78bd3bf2eb964c95eb2596d3cd367307a20b5","versionType":"git"},{"version":"68df0f195a689bbb0f92bfeadee6edd90c79c31f","status":"affected","lessThan":"9d74d1f52e16d8e07f7fbe52e96d6391418a2fe9","versionType":"git"},{"version":"68df0f195a689bbb0f92bfeadee6edd90c79c31f","status":"affected","lessThan":"29d48b87db64b6697ddad007548e51d032081c59","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_process.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.0.19","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.5","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","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/amdkfd/kfd_process.c"]}],"references":["https://git.kernel.org/stable/c/b6e78bd3bf2eb964c95eb2596d3cd367307a20b5","https://git.kernel.org/stable/c/9d74d1f52e16d8e07f7fbe52e96d6391418a2fe9","https://git.kernel.org/stable/c/29d48b87db64b6697ddad007548e51d032081c59"],"weaknesses":["CWE-476"],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50354.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50354","state":"PUBLISHED","datePublished":"2025-09-17T14:56:07.596Z","dateUpdated":"2026-08-05T08:58:20.719Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-09-17T14:53:06.993Z"},"containers":{"cna":{"title":"drm/amdkfd: Fix kfd_process_device_init_vm error handling","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Fix kfd_process_device_init_vm error handling\n\nShould only destroy the ib_mem and let process cleanup worker to free\nthe outstanding BOs. Reset the pointer in pdd->qpd structure, to avoid\nNULL pointer access in process destroy worker.\n\n BUG: kernel NULL pointer dereference, address: 0000000000000010\n Call Trace:\n  amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel+0x46/0xb0 [amdgpu]\n  kfd_process_device_destroy_cwsr_dgpu+0x40/0x70 [amdgpu]\n  kfd_process_destroy_pdds+0x71/0x190 [amdgpu]\n  kfd_process_wq_release+0x2a2/0x3b0 [amdgpu]\n  process_one_work+0x2a1/0x600\n  worker_thread+0x39/0x3d0"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"68df0f195a689bbb0f92bfeadee6edd90c79c31f","status":"affected","lessThan":"b6e78bd3bf2eb964c95eb2596d3cd367307a20b5","versionType":"git"},{"version":"68df0f195a689bbb0f92bfeadee6edd90c79c31f","status":"affected","lessThan":"9d74d1f52e16d8e07f7fbe52e96d6391418a2fe9","versionType":"git"},{"version":"68df0f195a689bbb0f92bfeadee6edd90c79c31f","status":"affected","lessThan":"29d48b87db64b6697ddad007548e51d032081c59","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_process.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.0.19","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.5","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","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/amdkfd/kfd_process.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b6e78bd3bf2eb964c95eb2596d3cd367307a20b5"},{"url":"https://git.kernel.org/stable/c/9d74d1f52e16d8e07f7fbe52e96d6391418a2fe9"},{"url":"https://git.kernel.org/stable/c/29d48b87db64b6697ddad007548e51d032081c59"}],"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 - Triggered through local /dev/kfd ioctls (AMDKFD_IOC_ACQUIRE_VM) and process teardown; the amdkfd path is not reachable from the network stack or remote protocols.\nAC:L - An unprivileged local attacker can reliably force the partial-init failure (e.g., memory pressure so the PAGE_SIZE IB alloc succeeds but the 2-page CWSR alloc fails) then exit to hit the dangling-pointer cleanup path; no conditions outside attacker control are required.\nPR:L - /dev/kfd and the DRM render node are accessible to unprivileged users in the render group or via uaccess; acquire_vm has no capability check (unlike CRIU), so only a normal local GPU user is required.\nUI:N - The attacker opens /dev/kfd and the render node, issues the ioctl, and exits their own process; no separate victim action is needed.\nS:U - Impact is confined to the local kernel/OS trust domain (oops or memory corruption in amdkfd cleanup); this is not a guest-to-host, IOMMU, or other cross-authority escape.\nC:H - Improper cleanup leaves qpd pointers to kgd_mem/BO objects that can already have been freed via DRM file teardown, which is a use-after-free; with heap reclaim that yields an arbitrary read primitive beyond a pure crash.\nI:H - The same dangling kgd_mem is passed into unmap/free paths in the destroy worker, so a reclaimed object can turn the UAF into an arbitrary write / control-flow hijack, not only a NULL deref.\nA:H - The reported bug is a kernel NULL pointer dereference in kfd_process_wq_release leading to an oops/panic, which is a full availability loss; UAF paths similarly crash the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:58:20.719Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.0.19"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2022-50354","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-01-14T18:31:35.341027Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-476","lang":"en","type":"CWE","description":"CWE-476 NULL Pointer Dereference"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-14T18:33:00.816Z"}}]}}}