Skip to contentSkip to conversation

CVE-2026-74306: vfio/qat: fix f_pos race in qat_vf_resume_write()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

vfio/qat: fix f_pos race in qat_vf_resume_write()

qat_vf_resume_write() checks filp->f_pos before taking migf->lock, but copies into the migration-state buffer after taking the lock and re-reading the shared file position.

Two concurrent writers could therefore pass the bounds check with the old offset, then have the second writer copy after the first advanced f_pos, writing past the end of the migration-state buffer.

Take migf->lock before doing the boundary checks.

The Linux kernel CVE team has assigned CVE-2026-74306 to this issue.

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

	Issue introduced in 6.10 with commit bb208810b1abf1c84870cfbe1cc9cf1a1d35c607 and fixed in 6.12.97 with commit 6465af0004dc1b067129a26ef44f19cdf13bbce6
	Issue introduced in 6.10 with commit bb208810b1abf1c84870cfbe1cc9cf1a1d35c607 and fixed in 6.18.40 with commit d416dcefdbac90d96b22485fd93f28229ad9984b
	Issue introduced in 6.10 with commit bb208810b1abf1c84870cfbe1cc9cf1a1d35c607 and fixed in 7.1.5 with commit b6fd7a40a66485c8aa8156d8fcf50b95cb8ba281
	Issue introduced in 6.10 with commit bb208810b1abf1c84870cfbe1cc9cf1a1d35c607 and fixed in 7.2-rc1 with commit 4ec5e932e636896e97e4c6a8205b0ac76d52421a

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-2026-74306

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/qat/main.c

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/6465af0004dc1b067129a26ef44f19cdf13bbce6
	https://git.kernel.org/stable/c/d416dcefdbac90d96b22485fd93f28229ad9984b
	https://git.kernel.org/stable/c/b6fd7a40a66485c8aa8156d8fcf50b95cb8ba281
	https://git.kernel.org/stable/c/4ec5e932e636896e97e4c6a8205b0ac76d52421a