# CVE-2026-80870: drm/amdkfd: Validate CRIU-restored IDs before idr_alloc

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2026-09-04T16:48:31.902Z
- Modified: 2026-09-04T17:16:58.860Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/amdkfd: Validate CRIU-restored IDs before idr_alloc

The KFD CRIU restore flow restores previously saved object IDs from
userspace.

For event restore:

  kfd_criu_restore_event()
      -> create_signal_event() / create_other_event()
          -> allocate_event_notification_slot()
              -> idr_alloc(..., *restore_id, *restore_id + 1, ...)

For BO restore:

  criu_restore_memory_of_gpu()
      -> idr_alloc(..., bo_priv->idr_handle, ...)

In both cases, the restored ID comes from userspace-provided CRIU data.

idr_alloc() expects the ID range values to fit within signed int
limits. If a restored ID is larger than INT_MAX, it can trigger a WARN
in the IDR layer.

A kernel WARN is undesirable because it prints a warning trace and may
cause a panic or reboot on systems with panic_on_warn enabled.

Smatch reported these paths as allowing unchecked userspace values to
reach idr_alloc().

Add INT_MAX validation before using restored IDs in:

- kfd_criu_restore_event()
- criu_restore_memory_of_gpu()

If the restored ID is invalid, return -EINVAL.

This prevents invalid restore data from reaching the IDR layer and
avoids WARN-triggering paths, while keeping valid restore behavior
unchanged.

(As written by CVE List.)

## Affected

- Linux Linux: from 40e8a766a761f7fdc8530347527b344fddf6f1a8 before f8687018f24037056692c1e93c7d96cc72889d5b; from 40e8a766a761f7fdc8530347527b344fddf6f1a8 before 89a75e3349c4fae28cbedc711bc924cbc6293da2; from 40e8a766a761f7fdc8530347527b344fddf6f1a8 before 085ea93bda71fee600cc12a17026598eb10dd1f9; from 40e8a766a761f7fdc8530347527b344fddf6f1a8 before 543ed0f61d56501cc585162da600bbedd7c08c0f; from 40e8a766a761f7fdc8530347527b344fddf6f1a8 before cb6311f25a096621ac7ffd91b50d1bb1cfb63a96; from 40e8a766a761f7fdc8530347527b344fddf6f1a8 before 85043dd49c2f51a37b22618168e3ae59ab92f0d6; 5.18 (not affected: before 5.18; from 6.1.178 up to 6.1.*; from 6.6.145 up to 6.6.*; from 6.12.97 up to 6.12.*; from 6.18.40 up to 6.18.*; from 7.1.5 up to 7.1.*; from 7.2 up to *)

## References

- <https://git.kernel.org/stable/c/f8687018f24037056692c1e93c7d96cc72889d5b>
- <https://git.kernel.org/stable/c/89a75e3349c4fae28cbedc711bc924cbc6293da2>
- <https://git.kernel.org/stable/c/085ea93bda71fee600cc12a17026598eb10dd1f9>
- <https://git.kernel.org/stable/c/543ed0f61d56501cc585162da600bbedd7c08c0f>
- <https://git.kernel.org/stable/c/cb6311f25a096621ac7ffd91b50d1bb1cfb63a96>
- <https://git.kernel.org/stable/c/85043dd49c2f51a37b22618168e3ae59ab92f0d6>

## Sources

- CVE List: [CVE-2026-80870](https://www.cve.org/CVERecord?id=CVE-2026-80870), CVE Terms of Use, modified 2026-09-04
- NVD: [CVE-2026-80870](https://nvd.nist.gov/vuln/detail/CVE-2026-80870), Public domain, modified 2026-09-04

---

Page: https://cve.day/CVE-2026-80870 · Whole record: https://cve.day/CVE-2026-80870.json · Rebuilt by cve.day 2026-11-25T22:59:36.367Z
