CVE-2025-21866
📋 TL;DR
A memory management vulnerability in the Linux kernel's PowerPC code patching subsystem incorrectly marks a text patching area as VM_ALLOC when it's not vmalloc memory. This causes KASAN (Kernel Address Sanitizer) to incorrectly flag valid memory accesses as out-of-bounds writes. Affects PowerPC systems running vulnerable Linux kernel versions with KASAN enabled.
💻 Affected Systems
- Linux kernel
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Kernel panic or system crash due to KASAN incorrectly detecting out-of-bounds memory writes, leading to denial of service.
Likely Case
System boot failures or crashes on PowerPC systems with KASAN enabled, particularly during BPF JIT compilation or text patching operations.
If Mitigated
No impact on systems without KASAN enabled or on non-PowerPC architectures.
🎯 Exploit Status
This is a kernel configuration issue that causes false positive KASAN reports rather than a traditional security vulnerability. Exploitation would require triggering specific kernel code paths with KASAN enabled.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in kernel commits: 2d542f13d26344e3452eee77613026ce9b653065, 2e6c80423f201405fd65254e52decd21663896f3, 6847b3e40bb963e57b61d1cc6fe84cb37b9d3d4c, 8d06e9208184b2851fa79a3a39d6860320c8bdf8, 97de5852058a299ba447cd9782fe96488d30108b
Vendor Advisory: https://git.kernel.org/stable/c/2d542f13d26344e3452eee77613026ce9b653065
Restart Required: Yes
Instructions:
1. Update to a kernel version containing the fix commits. 2. For distributions: Apply vendor kernel updates. 3. Rebuild kernel if compiling from source. 4. Reboot system to load patched kernel.
🔧 Temporary Workarounds
Disable KASAN
linuxDisable Kernel Address Sanitizer to prevent false positive reports
Rebuild kernel with CONFIG_KASAN=n or boot with 'kasan=off' kernel parameter
Avoid PowerPC text patching
linuxDisable features that trigger text patching (like BPF JIT)
echo 0 > /proc/sys/net/core/bpf_jit_enable
🧯 If You Can't Patch
- Disable KASAN in kernel configuration
- Avoid using BPF JIT compilation on affected PowerPC systems
- Monitor system logs for KASAN reports and restart affected services
🔍 How to Verify
Check if Vulnerable:
Check if system is PowerPC architecture with KASAN enabled and kernel version before fix commits: 'uname -m' and 'cat /proc/cmdline | grep kasan'
Check Version:
uname -r
Verify Fix Applied:
Check kernel version includes fix commits: 'uname -r' and verify with distribution patch notes
📡 Detection & Monitoring
Log Indicators:
- KASAN reports of vmalloc-out-of-bounds in copy_to_kernel_nofault
- Kernel panic messages related to text patching or BPF JIT
SIEM Query:
kernel_log: "KASAN: vmalloc-out-of-bounds" OR "copy_to_kernel_nofault" OR "text_area_cpu_up"
🔗 References
- https://git.kernel.org/stable/c/2d542f13d26344e3452eee77613026ce9b653065
- https://git.kernel.org/stable/c/2e6c80423f201405fd65254e52decd21663896f3
- https://git.kernel.org/stable/c/6847b3e40bb963e57b61d1cc6fe84cb37b9d3d4c
- https://git.kernel.org/stable/c/8d06e9208184b2851fa79a3a39d6860320c8bdf8
- https://git.kernel.org/stable/c/97de5852058a299ba447cd9782fe96488d30108b
- https://git.kernel.org/stable/c/c905a3053518212a1017e50bd2be3bee59305bb0
- https://git.kernel.org/stable/c/d262a192d38e527faa5984629aabda2e0d1c4f54
- https://git.kernel.org/stable/c/f8d4c5b653c1bc0df56e15658bbf64fc359adc4e
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html