bpf: Fix softlockup in arena_map_free on 64k page kernel
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.17, 6.13.5
- CVEs
- CVE-2025-21851
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 19:53 UTC · Revision 1
Source evidence
bpf: Fix softlockup in arena_map_free on 64k page kernel
core-osv · Original sourcePublished 12 Mar 2025, 09:42 UTC
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.
osv:CVE-2025-21851
Kernel
Fixed versions: 6.12.17, 6.13.5
Complete source record
{
"id": "ce5ab91a9dc6227ca1ecd6b8b69b5de0fc4e9d39b62f1fc45f4c105dfa3ed447",
"url": "https://osv.dev/vulnerability/CVE-2025-21851",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "bpf: Fix softlockup in arena_map_free on 64k page kernel",
"summary": "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.",
"evidence": "osv:CVE-2025-21851",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.17",
"evidence": "/affected/1/ranges"
},
{
"value": "6.13.5",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-21851",
"aliases": [
"CVE-2025-21851"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "317460317a02a1af512697e6e964298dedd8a163"
},
{
"fixed": "c1f3f3892d4526f18aaeffdb6068ce861e793ee3"
},
{
"fixed": "787d556a3de447e70964a4bdeba9196f62a62b1e"
},
{
"fixed": "517e8a7835e8cfb398a0aeb0133de50e31cae32b"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21851.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.9.0"
},
{
"fixed": "6.12.17"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.13.5"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21851.json"
}
}
],
"modified": "2026-10-28T02:30:32.145628971Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/517e8a7835e8cfb398a0aeb0133de50e31cae32b",
"https://git.kernel.org/stable/c/787d556a3de447e70964a4bdeba9196f62a62b1e",
"https://git.kernel.org/stable/c/c1f3f3892d4526f18aaeffdb6068ce861e793ee3",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21851.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-21851",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21851.json"
}
},
"related_cves": [
{
"value": "CVE-2025-21851",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 498840,
"published_at": "2025-03-12T09:42:06.48+00:00"
}