CVE-2025-21898
📋 TL;DR
This CVE addresses a potential division by zero vulnerability in the Linux kernel's ftrace subsystem within the function_stat_show() function. The vulnerability could cause kernel panics or system crashes when accessing ftrace statistics. It affects Linux systems with ftrace enabled and requires local access to trigger.
💻 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 →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 leading to system crash and denial of service, potentially causing data loss or service disruption.
Likely Case
System crash or kernel panic when accessing ftrace statistics through debugfs, resulting in temporary denial of service.
If Mitigated
No impact if ftrace is disabled or proper access controls prevent unauthorized users from accessing debugfs.
🎯 Exploit Status
Requires local access to debugfs interface and specific conditions to trigger the division by zero. No known active exploitation.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Multiple stable kernel versions with commits: 3d738b53ed6cddb68e68c9874520a4bf846163b5, 5b3d32f607f0478b414b16516cf27f9170cf66c8, 746cc474a95473591853927b3a9792a2d671155b, 992775227843c9376773784b8b362add44592ad7, 9cdac46fa7e854e587eb5f393fe491b6d7a9bdf6
Vendor Advisory: https://git.kernel.org/stable/c/
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from distribution vendor
2. Reboot system to load new kernel
3. Verify kernel version after reboot
🔧 Temporary Workarounds
Disable ftrace
linuxDisable ftrace functionality to prevent access to vulnerable code path
echo 0 > /sys/kernel/debug/tracing/tracing_on
umount /sys/kernel/debug
Restrict debugfs access
linuxMount debugfs with restricted permissions or unmount it entirely
mount -o remount,noexec,nosuid,nodev -t debugfs debugfs /sys/kernel/debug
chmod 700 /sys/kernel/debug
🧯 If You Can't Patch
- Disable ftrace functionality completely
- Restrict access to debugfs to trusted users only using filesystem permissions
🔍 How to Verify
Check if Vulnerable:
Check if ftrace is enabled and accessible: ls -la /sys/kernel/debug/tracing/
Check Version:
uname -r
Verify Fix Applied:
Check kernel version against patched versions from distribution vendor
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages in /var/log/messages or dmesg
- Division by zero errors in kernel logs
- System crashes when accessing ftrace statistics
Network Indicators:
- None - local vulnerability only
SIEM Query:
source="kernel" AND ("division by zero" OR "panic" OR "Oops") AND "ftrace"
🔗 References
- https://git.kernel.org/stable/c/3d738b53ed6cddb68e68c9874520a4bf846163b5
- https://git.kernel.org/stable/c/5b3d32f607f0478b414b16516cf27f9170cf66c8
- https://git.kernel.org/stable/c/746cc474a95473591853927b3a9792a2d671155b
- https://git.kernel.org/stable/c/992775227843c9376773784b8b362add44592ad7
- https://git.kernel.org/stable/c/9cdac46fa7e854e587eb5f393fe491b6d7a9bdf6
- https://git.kernel.org/stable/c/a1a7eb89ca0b89dc1c326eeee2596f263291aca3
- https://git.kernel.org/stable/c/ca381f60a3bb7cfaa618d73ca411610bd7fc3149
- https://git.kernel.org/stable/c/f58a3f8e284d0bdf94164a8e61cd4e70d337a1a3
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html