Skip to contentSkip to conversation

CVE-2025-40056: vhost: vringh: Fix copy_to_iter return value check

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28, 2025

lore
Share & tools
lore
#0 lore raw

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

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

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

vhost: vringh: Fix copy_to_iter return value check

The return value of copy_to_iter can't be negative, check whether the copied length is equal to the requested length instead of checking for negative values.

The Linux kernel CVE team has assigned CVE-2025-40056 to this issue.

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

	Issue introduced in 6.0 with commit 309bba39c945ac8ab8083ac05cd6cfe5822968e0 and fixed in 6.1.156 with commit bd71e7e0a612740e4de5524880c7cd40293af5f7
	Issue introduced in 6.0 with commit 309bba39c945ac8ab8083ac05cd6cfe5822968e0 and fixed in 6.6.112 with commit 781226e11d5bdea0d69c7b5aa3cda874093c73b8
	Issue introduced in 6.0 with commit 309bba39c945ac8ab8083ac05cd6cfe5822968e0 and fixed in 6.12.53 with commit b3a950d236e98440c07405ba597b11bce56a8050
	Issue introduced in 6.0 with commit 309bba39c945ac8ab8083ac05cd6cfe5822968e0 and fixed in 6.17.3 with commit 68aac2b335d474b938d154b9c95cbc58838cb2ce
	Issue introduced in 6.0 with commit 309bba39c945ac8ab8083ac05cd6cfe5822968e0 and fixed in 6.18-rc1 with commit 439263376c2c4e126cac0d07e4987568de4eaba5

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-2025-40056

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/vhost/vringh.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/bd71e7e0a612740e4de5524880c7cd40293af5f7
	https://git.kernel.org/stable/c/781226e11d5bdea0d69c7b5aa3cda874093c73b8
	https://git.kernel.org/stable/c/b3a950d236e98440c07405ba597b11bce56a8050
	https://git.kernel.org/stable/c/68aac2b335d474b938d154b9c95cbc58838cb2ce
	https://git.kernel.org/stable/c/439263376c2c4e126cac0d07e4987568de4eaba5