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

Medium 5.5 Published Updated

A missing check in the Linux kernel VFIO driver allows userspace to trigger a null pointer dereference, causing a system crash.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50117?

CVE-2022-50117 is a medium-severity vulnerability in Linux kernel, published on 18 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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

Which versions are affected by CVE-2022-50117?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50117?

Apply the vendor's patch.

Is CVE-2022-50117 being exploited?

There is no known exploitation of CVE-2022-50117 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50117, GHSA-g26v-cwrx-qvcw, UBUNTU-CVE-2022-50117.

Is CVE-2022-50117 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free