CVE-2022-50117

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50117
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50117.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50117
Downstream
Related
Published
2025-06-18T11:02:47Z
Modified
2025-10-16T03:08:55.837030Z
Summary
vfio: Split migration ops from main device ops
Details

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. setstate/getstate) 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 VFIOMIGRATIONSTOPCOPY since the uAPI claims it must be set in migrationflags.

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.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6fadb021266d03c5fd7bca2cfa1607efd246dad1
Fixed
bba6b12d73d36e0ddbc2c3ac5668a667b00d4345
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6fadb021266d03c5fd7bca2cfa1607efd246dad1
Fixed
6e97eba8ad8748fabb795cffc5d9e1a7dcfd7367

Affected versions

v5.*

v5.17
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8
v5.19.1

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
5.19.2