Skip to contentSkip to conversation

CVE-2025-38366: LoongArch: KVM: Check validity of "num_cpu" from user space

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 25, 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:

LoongArch: KVM: Check validity of "num_cpu" from user space

The maximum supported cpu number is EIOINTC_ROUTE_MAX_VCPUS about irqchip EIOINTC, here add validation about cpu number to avoid array pointer overflow.

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

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

	Issue introduced in 6.13 with commit 1ad7efa552fd5cf4e8c49fea863c5c6a5dcf9f00 and fixed in 6.15.5 with commit a3293b4078ee93174f70f36d3ab7618554ce6ab6
	Issue introduced in 6.13 with commit 1ad7efa552fd5cf4e8c49fea863c5c6a5dcf9f00 and fixed in 6.16-rc4 with commit cc8d5b209e09d3b52bca1ffe00045876842d96ae

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-38366

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:
arch/loongarch/kvm/intc/eiointc.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/a3293b4078ee93174f70f36d3ab7618554ce6ab6
	https://git.kernel.org/stable/c/cc8d5b209e09d3b52bca1ffe00045876842d96ae