# CVE-2022-50117: vfio: Split migration ops from main device ops

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- 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.24%, higher than 9% of CVEs (2026-11-30)
- Published: 2025-06-18T11:02:47.994Z
- Modified: 2026-06-17T05:22:47.697Z
- Assigned by: Linux

## Description

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

vfio: Split migration ops from main device ops

vfio core checks whether the driver sets some migration op (e.g.
set_state/get_state) and accordingly calls its op.

However, currently mlx5 driver sets the above ops without regards to its
migration caps.

This might lead to unexpected usage/Oops if user space may call to the
above ops even if the driver doesn't support migration. As for example,
the migration state_mutex is not initialized in that case.

The cleanest way to manage that seems to split the migration ops from
the main device ops, this will let the driver setting them separately
from the main ops when it's applicable.

As part of that, validate ops construction on registration and include a
check for VFIO_MIGRATION_STOP_COPY since the uAPI claims it must be set
in migration_flags.

HISI driver was changed as well to match this scheme.

This scheme may enable down the road to come with some extra group of
ops (e.g. DMA log) that can be set without regards to the other options
based on driver caps.

(As written by CVE List.)

## Affected

- Linux Linux: from 6fadb021266d03c5fd7bca2cfa1607efd246dad1 before bba6b12d73d36e0ddbc2c3ac5668a667b00d4345; from 6fadb021266d03c5fd7bca2cfa1607efd246dad1 before 6e97eba8ad8748fabb795cffc5d9e1a7dcfd7367; 5.18 (not affected: before 5.18; from 5.19.2 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 5.18 before 5.19.2

## References

- <https://git.kernel.org/stable/c/bba6b12d73d36e0ddbc2c3ac5668a667b00d4345> (patch)
- <https://git.kernel.org/stable/c/6e97eba8ad8748fabb795cffc5d9e1a7dcfd7367> (patch)

## Sources

- CVE List: [CVE-2022-50117](https://www.cve.org/CVERecord?id=CVE-2022-50117), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-50117](https://nvd.nist.gov/vuln/detail/CVE-2022-50117), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-50117 · Whole record: https://cve.day/CVE-2022-50117.json · Rebuilt by cve.day 2026-11-25T22:58:21.061Z
