# CVE-2022-50303: drm/amdkfd: Fix double release compute pasid

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-415
- **Published:** 2025-09-15T14:45:58.735Z
- **Modified:** 2026-10-15T22:17:29.717Z

## Who should check

- Anyone running Linux \>= 1685b01a858872075bc258a350153de0c7e95404, \< 89f0d766c9e3fdeafbed6f855d433c2768cde862; \>= 1685b01a858872075bc258a350153de0c7e95404, \< a02c07b619899179384fde06f951530438a3512d; \>= 1685b01a858872075bc258a350153de0c7e95404, \< 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5
- Anyone running Linux 4.20

## 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

- Linux: \>= 1685b01a858872075bc258a350153de0c7e95404, \< 89f0d766c9e3fdeafbed6f855d433c2768cde862; \>= 1685b01a858872075bc258a350153de0c7e95404, \< a02c07b619899179384fde06f951530438a3512d; \>= 1685b01a858872075bc258a350153de0c7e95404, \< 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 (cvelist)
- Linux: 4.20 (cvelist)

## Mitigation

- Upgrade Linux to 1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- patch: <https://git.kernel.org/stable/c/89f0d766c9e3fdeafbed6f855d433c2768cde862>
- patch: <https://git.kernel.org/stable/c/a02c07b619899179384fde06f951530438a3512d>
- patch: <https://git.kernel.org/stable/c/1a799c4c190ea9f0e81028e3eb3037ed0ab17ff5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50303>

HTML: <https://flawdb.com/CVE-2022-50303> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50303>
