lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025061810-CVE-2022-50117-7322@gregkh>
Date: Wed, 18 Jun 2025 13:03:02 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-50117: vfio: Split migration ops from main device ops

From: Greg Kroah-Hartman <gregkh@...nel.org>

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.

The Linux kernel CVE team has assigned CVE-2022-50117 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.18 with commit 6fadb021266d03c5fd7bca2cfa1607efd246dad1 and fixed in 5.19.2 with commit bba6b12d73d36e0ddbc2c3ac5668a667b00d4345
	Issue introduced in 5.18 with commit 6fadb021266d03c5fd7bca2cfa1607efd246dad1 and fixed in 6.0 with commit 6e97eba8ad8748fabb795cffc5d9e1a7dcfd7367

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2022-50117
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
	drivers/vfio/pci/mlx5/cmd.c
	drivers/vfio/pci/mlx5/cmd.h
	drivers/vfio/pci/mlx5/main.c
	drivers/vfio/pci/vfio_pci_core.c
	drivers/vfio/vfio.c
	include/linux/vfio.h


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/bba6b12d73d36e0ddbc2c3ac5668a667b00d4345
	https://git.kernel.org/stable/c/6e97eba8ad8748fabb795cffc5d9e1a7dcfd7367

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ