{"id":"CVE-2025-21785","state":"PUBLISHED","title":"arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array","description":"In the Linux kernel, the following vulnerability has been resolved:\n\narm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array\n\nThe loop that detects/populates cache information already has a bounds\ncheck on the array size but does not account for cache levels with\nseparate data/instructions cache. Fix this by incrementing the index\nfor any populated leaf (instead of any populated level).","publishedAt":"2025-02-27T02:18:25.938Z","updatedAt":"2026-10-15T21:51:52.980Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"4371ac7b494e933fffee2bd6265d18d73c4f05aa","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"e4fde33107351ec33f1a64188612fbc6ca659284","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"88a3e6afaf002250220793df99404977d343db14","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"4ff25f0b18d1d0174c105e4620428bcdc1213860","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"ab90894f33c15b14c1cee6959ab6c8dcb09127f8","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"715eb1af64779e1b1aa0a7b2ffb81414d9f708e5","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"67b99a2b5811df4294c2ad50f9bff3b6a08bd618","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"875d742cf5327c93cba1f11e12b08d3cce7a88d2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kernel/cacheinfo.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.0","versionType":"semver"},{"version":"5.4.291","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.235","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.179","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.79","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.16","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.4","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kernel/cacheinfo.c"]}],"references":["https://git.kernel.org/stable/c/4371ac7b494e933fffee2bd6265d18d73c4f05aa","https://git.kernel.org/stable/c/e4fde33107351ec33f1a64188612fbc6ca659284","https://git.kernel.org/stable/c/88a3e6afaf002250220793df99404977d343db14","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","https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html","https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/21xxx/CVE-2025-21785.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21785","state":"PUBLISHED","datePublished":"2025-02-27T02:18:25.938Z","dateUpdated":"2026-10-15T21:51:52.980Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.765Z"},"containers":{"cna":{"title":"arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\narm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array\n\nThe loop that detects/populates cache information already has a bounds\ncheck on the array size but does not account for cache levels with\nseparate data/instructions cache. Fix this by incrementing the index\nfor any populated leaf (instead of any populated level)."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"4371ac7b494e933fffee2bd6265d18d73c4f05aa","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"e4fde33107351ec33f1a64188612fbc6ca659284","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"88a3e6afaf002250220793df99404977d343db14","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"4ff25f0b18d1d0174c105e4620428bcdc1213860","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"ab90894f33c15b14c1cee6959ab6c8dcb09127f8","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"715eb1af64779e1b1aa0a7b2ffb81414d9f708e5","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"67b99a2b5811df4294c2ad50f9bff3b6a08bd618","versionType":"git"},{"version":"5d425c18653731af62831d30a4fa023d532657a9","status":"affected","lessThan":"875d742cf5327c93cba1f11e12b08d3cce7a88d2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kernel/cacheinfo.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.0","versionType":"semver"},{"version":"5.4.291","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.235","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.179","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.79","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.16","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.4","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kernel/cacheinfo.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/4371ac7b494e933fffee2bd6265d18d73c4f05aa"},{"url":"https://git.kernel.org/stable/c/e4fde33107351ec33f1a64188612fbc6ca659284"},{"url":"https://git.kernel.org/stable/c/88a3e6afaf002250220793df99404977d343db14"},{"url":"https://git.kernel.org/stable/c/4ff25f0b18d1d0174c105e4620428bcdc1213860"},{"url":"https://git.kernel.org/stable/c/ab90894f33c15b14c1cee6959ab6c8dcb09127f8"},{"url":"https://git.kernel.org/stable/c/715eb1af64779e1b1aa0a7b2ffb81414d9f708e5"},{"url":"https://git.kernel.org/stable/c/67b99a2b5811df4294c2ad50f9bff3b6a08bd618"},{"url":"https://git.kernel.org/stable/c/875d742cf5327c93cba1f11e12b08d3cce7a88d2"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The defect lives in arm64 CPU cacheinfo initialization, reached only through local CPU bring-up (`update_siblings_masks()`) and the CPUHP_AP_BASE_CACHEINFO_ONLINE hotplug callback on the machine itself; there is no network, adjacent-network, or remote-peer data path into `populate_cache_leaves()`.\nAC:L - On an affected platform the overflow is fully deterministic — whenever firmware (DT `cache-unified`/single `cache-size`, or ACPI PPTT `split_levels`) under-counts leaves relative to a `CLIDR_EL1` level reporting `CACHE_TYPE_SEPARATE`, the level-vs-leaf counter mismatch fires on every execution of the loop. There is no race, no timing window, and no memory-layout condition to win.\nPR:L - The vulnerable loop executes with no `capable()` check, no LSM gate, and no authentication anywhere on the path — it runs as part of normal CPU bring-up on behalf of the system, so no elevated credentials are required for the out-of-bounds write to occur; scoring at low local privilege rather than high since nothing on the path demands real root.\nUI:N - No victim action of any kind is needed — the out-of-bounds write happens autonomously during secondary-CPU initialization as part of ordinary system startup.\nS:U - The corruption is confined to the kernel's own slab allocations on the same host; no VM/hypervisor, IOMMU/DMA, or sandbox authority boundary is crossed.\nC:H - The heap out-of-bounds write clobbers `type` and `level` fields at fixed strides across up to several hundred bytes of adjacent slab objects allocated during early boot; corrupting neighbouring structures' length, index, or pointer fields is a classic route to kernel memory disclosure, so per memory-corruption guidance this is High.\nI:H - This is a direct out-of-bounds write past a `kcalloc()`'d `struct cacheinfo` array, silently modifying kernel heap memory belonging to unrelated objects — out-of-bounds writes are scored High for integrity because slab corruption is the standard primitive for control-flow hijack.\nA:H - Overwriting adjacent early-boot slab objects can corrupt pointers or allocator metadata, producing an oops, panic, or unbootable system; because it occurs during CPU bring-up on affected platforms, the result is complete loss of availability of the machine."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:54:23.832Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"5.4.291"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"5.10.235"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"5.15.179"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"6.1.129"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"6.6.79"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"6.12.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"6.13.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T20:59:30.431Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-21785","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:42:54.678406Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:51:52.980Z"}}]}}}