CVE-2022-50303
drm/amdkfd: Fix double release compute pasid
Mitigation
- Upgrade Linux to 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 or later.
Who should check
- Anyone running Linux >= 1685b01a858872075bc258a350153de0c7e95404, < 89f0d766c9e3fdeafbed6f855d433c2768cde862; >= 1685b01a858872075bc258a350153de0c7e95404, < a02c07b619899179384fde06f951530438a3512d; >= 1685b01a858872075bc258a350153de0c7e95404, < 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5
- Anyone running Linux 4.20
Vulnerability facts
- Affected
- Linux >= 1685b01a858872075bc258a350153de0c7e95404, < 89f0d766c9e3fdeafbed6f855d433c2768cde862; >= 1685b01a858872075bc258a350153de0c7e95404, < a02c07b619899179384fde06f951530438a3512d; >= 1685b01a858872075bc258a350153de0c7e95404, < 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5; Linux 4.20
- Fixed in
- Linux 89f0d766c9e3fdeafbed6f855d433c2768cde862, Linux 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.24% chance of exploitation in 30 days (percentile 9, 2026-11-26)
- CWE
- CWE-415
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Fix double release compute pasid If kfd_process_device_init_vm returns failure after vm is converted to compute vm and vm->pasid set to compute pasid, KFD will not take pdd->drm_file reference. As a result, drm close file handler maybe called to release the compute pasid before KFD process destroy worker to release the same pasid and set vm->pasid to zero, this generates below WARNING backtrace and NULL pointer access. Add helper amdgpu_amdkfd_gpuvm_set_vm_pasid and call it at the last step of kfd_process_device_init_vm, to ensure vm pasid is the original pasid if acquiring vm failed or is the compute pasid with pdd->drm_file reference taken to avoid double release same pasid. amdgpu: Failed to create process VM object ida_free called for id=32770 which is not allocated. WARNING: CPU: 57 PID: 72542 at ../lib/idr.c:522 ida_free+0x96/0x140 RIP: 0010:ida_free+0x96/0x140 Call Trace: amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu] amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu] drm_file_free.part.13+0x216/0x270 [drm] drm_close_helper.isra.14+0x60/0x70 [drm] drm_release+0x6e/0xf0 [drm] __fput+0xcc/0x280 ____fput+0xe/0x20 task_work_run+0x96/0xc0 do_exit+0x3d0/0xc10 BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:ida_free+0x76/0x140 Call Trace: amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu] amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu] drm_file_free.part.13+0x216/0x270 [drm] drm_close_helper.isra.14+0x60/0x70 [drm] drm_release+0x6e/0xf0 [drm] __fput+0xcc/0x280 ____fput+0xe/0x20 task_work_run+0x96/0xc0 do_exit+0x3d0/0xc10
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 1685b01a858872075bc258a350153de0c7e95404, < 89f0d766c9e3fdeafbed6f855d433c2768cde862; >= 1685b01a858872075bc258a350153de0c7e95404, < a02c07b619899179384fde06f951530438a3512d; >= 1685b01a858872075bc258a350153de0c7e95404, < 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 | — | cvelist |
| Linux | 4.20 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-50303. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-50303.md Affected: Linux >= 1685b01a858872075bc258a350153de0c7e95404, < 89f0d766c9e3fdeafbed6f855d433c2768cde862; >= 1685b01a858872075bc258a350153de0c7e95404, < a02c07b619899179384fde06f951530438a3512d; >= 1685b01a858872075bc258a350153de0c7e95404, < 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5; Linux 4.20 Fixed in: Linux 89f0d766c9e3fdeafbed6f855d433c2768cde862, Linux 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2022-50303 being exploited?
There is no confirmed exploitation: CVE-2022-50303 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-50303?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2022-50303?
Linux >= 1685b01a858872075bc258a350153de0c7e95404, < 89f0d766c9e3fdeafbed6f855d433c2768cde862; >= 1685b01a858872075bc258a350153de0c7e95404, < a02c07b619899179384fde06f951530438a3512d; >= 1685b01a858872075bc258a350153de0c7e95404, < 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5; Linux 4.20.
Is there a fix for CVE-2022-50303?
Yes. Fixed in Linux 89f0d766c9e3fdeafbed6f855d433c2768cde862, Linux 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5. Upgrade Linux to 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 or later.
How do I check if I'm affected by CVE-2022-50303?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.