CVE-2025-21851: 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 arenamapfree on 64k page kernel
On an aarch64 kernel with CONFIGPAGESIZE64KB=y, arenahtab tests cause a segmentation fault and soft lockup. The same failure is not observed with 4k pages on aarch64.
It turns out arenamapfree() is calling applytoexistingpagerange() with the address returned by bpfarenagetkernvmstart(). If this address is not page-aligned the code ends up calling applytopterange() with that unaligned address causing soft lockup.
Fix it by round up GUARDSZ to PAGESIZE 1 so that the division by 2 in bpfarenagetkernvmstart() returns a page-aligned value.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix softlockup in arenamapfree on 64k page kernel
On an aarch64 kernel with CONFIGPAGESIZE64KB=y, arenahtab tests cause a segmentation fault and soft lockup. The same failure is not observed with 4k pages on aarch64.
It turns out arenamapfree() is calling applytoexistingpagerange() with the address returned by bpfarenagetkernvmstart(). If this address is not page-aligned the code ends up calling applytopterange() with that unaligned address causing soft lockup.
Fix it by round up GUARDSZ to PAGESIZE << 1 so that the division by 2 in bpfarenagetkernvmstart() returns a page-aligned value.
— NVD
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21851?
CVE-2025-21851 has been designated a high severity vulnerability due to its potential to cause segmentation faults and soft lockups.
How do I fix CVE-2025-21851?
To fix CVE-2025-21851, update your Linux kernel to the latest version that addresses this vulnerability.
What is affected by CVE-2025-21851?
CVE-2025-21851 affects the Linux kernel when configured with 64k page size on aarch64 systems.
What are the symptoms of CVE-2025-21851?
Symptoms of CVE-2025-21851 include experiencing segmentation faults and soft lockups during arena_htab tests.
Is there a workaround for CVE-2025-21851?
A potential workaround for CVE-2025-21851 is to configure the kernel to use a 4k page size instead of a 64k page size.