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

High 7.8 Published Updated

A missing validation of the CPU count in LoongArch KVM allows an array pointer overflow, potentially leading to code execution or privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-38366?

CVE-2025-38366 is a high-severity vulnerability in Linux kernel, published on 25 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Which versions are affected by CVE-2025-38366?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-38366?

Apply the vendor's patch.

Is CVE-2025-38366 being exploited?

There is no known exploitation of CVE-2025-38366 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-38366, GHSA-vj8j-2cq7-gxhm, UBUNTU-CVE-2025-38366.

Is CVE-2025-38366 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free