# CVE-2025-21851: bpf: Fix softlockup in arena_map_free on 64k page kernel

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-03-12T09:42:06.480Z
- Modified: 2026-08-05T11:54:55.041Z
- Weaknesses: CWE-667
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

bpf: Fix softlockup in arena_map_free on 64k page kernel

On an aarch64 kernel with CONFIG_PAGE_SIZE_64KB=y,
arena_htab tests cause a segmentation fault and soft lockup.
The same failure is not observed with 4k pages on aarch64.

It turns out arena_map_free() is calling
apply_to_existing_page_range() with the address returned by
bpf_arena_get_kern_vm_start().  If this address is not page-aligned
the code ends up calling apply_to_pte_range() with that unaligned
address causing soft lockup.

Fix it by round up GUARD_SZ to PAGE_SIZE << 1 so that the
division by 2 in bpf_arena_get_kern_vm_start() returns
a page-aligned value.

(As written by CVE List.)

## Affected

- Linux Linux: from 317460317a02a1af512697e6e964298dedd8a163 before c1f3f3892d4526f18aaeffdb6068ce861e793ee3; from 317460317a02a1af512697e6e964298dedd8a163 before 787d556a3de447e70964a4bdeba9196f62a62b1e; from 317460317a02a1af512697e6e964298dedd8a163 before 517e8a7835e8cfb398a0aeb0133de50e31cae32b; 6.9 (not affected: before 6.9; from 6.12.17 up to 6.12.*; from 6.13.5 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.9 before 6.12.17; from 6.13 before 6.13.5; 6.9; 6.14

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://git.kernel.org/stable/c/c1f3f3892d4526f18aaeffdb6068ce861e793ee3> (patch)
- <https://git.kernel.org/stable/c/787d556a3de447e70964a4bdeba9196f62a62b1e> (patch)
- <https://git.kernel.org/stable/c/517e8a7835e8cfb398a0aeb0133de50e31cae32b> (patch)

## Sources

- CVE List: [CVE-2025-21851](https://www.cve.org/CVERecord?id=CVE-2025-21851), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-21851](https://nvd.nist.gov/vuln/detail/CVE-2025-21851), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-21851 · Whole record: https://cve.day/CVE-2025-21851.json · Rebuilt by cve.day 2026-11-25T22:58:55.199Z
