Skip to contentSkip to conversation

CVE-2025-21785: arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 27, 2025

lore
Share & tools
lore
#0 lore raw

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

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

arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array

The loop that detects/populates cache information already has a bounds check on the array size but does not account for cache levels with separate data/instructions cache. Fix this by incrementing the index for any populated leaf (instead of any populated level).

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

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

	Issue introduced in 4.0 with commit 5d425c18653731af62831d30a4fa023d532657a9 and fixed in 6.1.129 with commit 4ff25f0b18d1d0174c105e4620428bcdc1213860
	Issue introduced in 4.0 with commit 5d425c18653731af62831d30a4fa023d532657a9 and fixed in 6.6.79 with commit ab90894f33c15b14c1cee6959ab6c8dcb09127f8
	Issue introduced in 4.0 with commit 5d425c18653731af62831d30a4fa023d532657a9 and fixed in 6.12.16 with commit 715eb1af64779e1b1aa0a7b2ffb81414d9f708e5
	Issue introduced in 4.0 with commit 5d425c18653731af62831d30a4fa023d532657a9 and fixed in 6.13.4 with commit 67b99a2b5811df4294c2ad50f9bff3b6a08bd618
	Issue introduced in 4.0 with commit 5d425c18653731af62831d30a4fa023d532657a9 and fixed in 6.14-rc3 with commit 875d742cf5327c93cba1f11e12b08d3cce7a88d2

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

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/arm64/kernel/cacheinfo.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/4ff25f0b18d1d0174c105e4620428bcdc1213860
	https://git.kernel.org/stable/c/ab90894f33c15b14c1cee6959ab6c8dcb09127f8
	https://git.kernel.org/stable/c/715eb1af64779e1b1aa0a7b2ffb81414d9f708e5
	https://git.kernel.org/stable/c/67b99a2b5811df4294c2ad50f9bff3b6a08bd618
	https://git.kernel.org/stable/c/875d742cf5327c93cba1f11e12b08d3cce7a88d2