CVE-2025-38320
📋 TL;DR
This CVE describes a stack-out-of-bounds read vulnerability in the Linux kernel's arm64/ptrace component. The flaw occurs in regs_get_kernel_stack_nth() function where KASAN incorrectly reports a stack boundary violation when reading kernel stack values. This affects Linux systems running on ARM64 architecture with kernel debugging/probing features 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 →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 memory disclosure leading to information leakage, potential privilege escalation if combined with other vulnerabilities, or kernel panic causing denial of service.
Likely Case
Information disclosure of kernel stack memory, potentially exposing sensitive data or kernel pointers that could aid further exploitation.
If Mitigated
Minimal impact with proper kernel hardening and KASAN configurations, primarily affecting debugging/probing functionality.
🎯 Exploit Status
Requires local access and ability to trigger kernel debugging functions. Similar issue was previously fixed on s390 architecture.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel with commits: 01f91d415a8375d85e0c7d3615cd4a168308bb7c, 21da6d3561f373898349ca7167c9811c020da695, 22f935bc86bdfbde04009f05eee191d220cd8c89, 39dfc971e42d886e7df01371cd1bef505076d84c, 422e565b7889ebfd9c8705a3fc786642afe61fca
Vendor Advisory: https://git.kernel.org/stable/c/01f91d415a8375d85e0c7d3615cd4a168308bb7c
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable kernel debugging features
linuxDisable kprobes and kernel tracing functionality to prevent triggering the vulnerable code path
echo 0 > /sys/kernel/debug/tracing/events/kprobes/enable
echo 0 > /proc/sys/kernel/kptr_restrict
🧯 If You Can't Patch
- Restrict access to debugging/probing capabilities to trusted users only
- Implement strict privilege separation and limit local user access
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if running on ARM64 architecture with debugging enabled: uname -r && grep -i arm64 /proc/cpuinfo
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version contains fix commits: grep -E '01f91d415a8375d85e0c7d3615cd4a168308bb7c|21da6d3561f373898349ca7167c9811c020da695' /proc/version
📡 Detection & Monitoring
Log Indicators:
- KASAN stack-out-of-bounds warnings in kernel logs
- regs_get_kernel_stack_nth errors in dmesg
Network Indicators:
- None - local vulnerability only
SIEM Query:
source="kernel" AND "KASAN: stack-out-of-bounds" AND "regs_get_kernel_stack_nth"
🔗 References
- https://git.kernel.org/stable/c/01f91d415a8375d85e0c7d3615cd4a168308bb7c
- https://git.kernel.org/stable/c/21da6d3561f373898349ca7167c9811c020da695
- https://git.kernel.org/stable/c/22f935bc86bdfbde04009f05eee191d220cd8c89
- https://git.kernel.org/stable/c/39dfc971e42d886e7df01371cd1bef505076d84c
- https://git.kernel.org/stable/c/422e565b7889ebfd9c8705a3fc786642afe61fca
- https://git.kernel.org/stable/c/64773b3ea09235168a549a195cba43bb867c4a17
- https://git.kernel.org/stable/c/67abac27d806e8f9d4226ec1528540cf73af673a
- https://git.kernel.org/stable/c/92750bfe7b0d8dbcaf578c091a65eda1c5f9ad38
- https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html