{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21851","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-12-29T08:45:45.779Z","datePublished":"2025-03-12T09:42:06.480Z","dateUpdated":"2026-08-05T11:54:55.041Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:54:55.041Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix softlockup in arena_map_free on 64k page kernel\n\nOn an aarch64 kernel with CONFIG_PAGE_SIZE_64KB=y,\narena_htab tests cause a segmentation fault and soft lockup.\nThe same failure is not observed with 4k pages on aarch64.\n\nIt turns out arena_map_free() is calling\napply_to_existing_page_range() with the address returned by\nbpf_arena_get_kern_vm_start().  If this address is not page-aligned\nthe code ends up calling apply_to_pte_range() with that unaligned\naddress causing soft lockup.\n\nFix it by round up GUARD_SZ to PAGE_SIZE << 1 so that the\ndivision by 2 in bpf_arena_get_kern_vm_start() returns\na page-aligned value."}],"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 vulnerability is reached through the bpf(2) syscall — creating a BPF_MAP_TYPE_ARENA map, mmap()ing it, faulting in a page, and closing the fd. No network exposure is involved.\nAC:L - On an affected kernel (arm64 with 64K pages, a mainstream aarch64 distro/server configuration), the unaligned base address makes the non-terminating apply_to_pte_range() loop trigger 100% deterministically with a trivial 4-step sequence; there is no race or memory-layout condition to win.\nPR:L - Arena map creation requires CAP_BPF, but bpf_token_capable() resolves via ns_capable(token->userns, CAP_BPF), so a delegated BPF token or a container granted CAP_BPF lets an otherwise unprivileged user reach it; this is a delegatable capability, not init-namespace root.\nUI:N - The attacker performs the entire sequence — map create, mmap, page touch, fd close — in their own process. No victim action is required.\nS:U - The infinite loop, out-of-bounds page-table walk, and page frees all occur within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Once pte++ walks past the end of the PTE page, arbitrary kernel memory is read and interpreted as page-table entries, and __free_page() on garbage-derived struct pages releases in-use pages for reallocation, which is leverageable for disclosure of other tasks' data.\nI:H - existing_page_cb() calls __free_page() on struct page pointers decoded from out-of-bounds memory, corrupting page refcounts and prematurely freeing live pages — a use-after-free primitive suitable for heap grooming and control-flow hijacking.\nA:H - The `while (addr += PAGE_SIZE, addr != end)` loop can never terminate, producing a soft lockup/RCU stall inside a lazy-MMU section on a system workqueue, hanging the machine; the stray page frees compound this into a panic."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/arena.c"],"versions":[{"version":"317460317a02a1af512697e6e964298dedd8a163","lessThan":"c1f3f3892d4526f18aaeffdb6068ce861e793ee3","status":"affected","versionType":"git"},{"version":"317460317a02a1af512697e6e964298dedd8a163","lessThan":"787d556a3de447e70964a4bdeba9196f62a62b1e","status":"affected","versionType":"git"},{"version":"317460317a02a1af512697e6e964298dedd8a163","lessThan":"517e8a7835e8cfb398a0aeb0133de50e31cae32b","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/arena.c"],"versions":[{"version":"6.9","status":"affected"},{"version":"0","lessThan":"6.9","status":"unaffected","versionType":"semver"},{"version":"6.12.17","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13.5","lessThanOrEqual":"6.13.*","status":"unaffected","versionType":"semver"},{"version":"6.14","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.12.17"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.13.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.14"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/c1f3f3892d4526f18aaeffdb6068ce861e793ee3"},{"url":"https://git.kernel.org/stable/c/787d556a3de447e70964a4bdeba9196f62a62b1e"},{"url":"https://git.kernel.org/stable/c/517e8a7835e8cfb398a0aeb0133de50e31cae32b"}],"title":"bpf: Fix softlockup in arena_map_free on 64k page kernel","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":3.3,"attackVector":"LOCAL","baseSeverity":"LOW","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"LOW","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2025-21851","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2025-10-01T19:26:12.815420Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","cweId":"CWE-667","description":"CWE-667 Improper Locking"}]}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2025-10-01T19:26:38.747Z"}}]}}