[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025102817-CVE-2025-40065-7740@gregkh>
Date: Tue, 28 Oct 2025 12:48:42 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-40065: RISC-V: KVM: Write hgatp register with valid mode bits
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
RISC-V: KVM: Write hgatp register with valid mode bits
According to the RISC-V Privileged Architecture Spec, when MODE=Bare
is selected,software must write zero to the remaining fields of hgatp.
We have detected the valid mode supported by the HW before, So using a
valid mode to detect how many vmid bits are supported.
The Linux kernel CVE team has assigned CVE-2025-40065 to this issue.
Affected and fixed versions
===========================
	Issue introduced in 5.16 with commit fd7bb4a251dfc1da3496bf59a4793937c13e8c1f and fixed in 6.17.3 with commit d00b61cd37f4c183ce0edbc9f8ccf6d5430ea357
	Issue introduced in 5.16 with commit fd7bb4a251dfc1da3496bf59a4793937c13e8c1f and fixed in 6.18-rc1 with commit 2b351e3d04be9e1533f26c3464f1e44a5beace30
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-40065
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/riscv/kvm/vmid.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/d00b61cd37f4c183ce0edbc9f8ccf6d5430ea357
	https://git.kernel.org/stable/c/2b351e3d04be9e1533f26c3464f1e44a5beace30
Powered by blists - more mailing lists
 
