CVE-2025-21785
kernel: arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · February 27, 2025
Updated · November 3, 2026
Description
A flaw was found in the Linux kernel. During processor cache detection on ARM64 systems featuring separate instruction and data caches, the kernel fails to properly account for cache entries against allocated array limits, resulting in an out-of-bounds memory write. A local attacker could leverage this vulnerability to cause memory corruption, potentially leading to system instability or a Denial of Service (DoS).
Statement
An indexing error in arm64 cache discovery can write beyond the allocated cacheinfo array when a cache level contains separate data and instruction cache leaves. The affected initialization path advances the destination for two leaves while the original bounds counter advances only once per cache level. This provides a structured out-of-bounds write in kernel memory and can cause a kernel crash. Depending on the adjacent allocation and later use of corrupted data, confidentiality or integrity impact and local privilege escalation cannot be excluded without further analysis. For the CVSS the PR:H reflects that a reliable trigger normally requires administrative control of CPU hotplug or of the platform cache topology. The issue is not network reachable and an ordinary local user cannot directly invoke cache topology population. The paranoid score uses C:H I:H A:H because the confirmed primitive is an out-of-bounds kernel write, although control over the written values appears limited.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 6.4CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
CWE-787 · Out-of-bounds Write