CVE-2025-21736

5.5 MEDIUM

📋 TL;DR

This CVE describes an integer overflow vulnerability in the nilfs2 filesystem's fiemap function in the Linux kernel. An attacker could potentially trigger this overflow to cause a kernel panic or system crash, affecting systems using the nilfs2 filesystem. The vulnerability requires local access to the system.

💻 Affected Systems

Products:
  • Linux kernel with nilfs2 filesystem support
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions with nilfs2 support enabled
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if nilfs2 filesystem is actually in use. Most distributions don't enable nilfs2 by default.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to denial of service, potentially allowing privilege escalation if combined with other vulnerabilities.

🟠

Likely Case

System crash or kernel panic resulting in denial of service for the affected system.

🟢

If Mitigated

No impact if nilfs2 filesystem is not in use or proper access controls prevent local exploitation.

🌐 Internet-Facing: LOW - Requires local access to exploit, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local attackers or malicious users could cause system crashes on affected systems using nilfs2.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires local access and specific conditions to trigger the integer overflow. The vulnerability was found through static analysis.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commits 250423300b4b0335918be187ef3cade248c06e6a or later

Vendor Advisory: https://git.kernel.org/stable/c/250423300b4b0335918be187ef3cade248c06e6a

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commit. 2. Check your distribution's security advisories for specific patched kernel versions. 3. Reboot the system after kernel update.

🔧 Temporary Workarounds

Disable nilfs2 module

linux

Prevent loading of nilfs2 kernel module if not needed

echo 'install nilfs2 /bin/true' >> /etc/modprobe.d/disable-nilfs2.conf
rmmod nilfs2

Restrict access to fiemap ioctl

linux

Limit which users can access the vulnerable fiemap functionality

🧯 If You Can't Patch

  • Disable nilfs2 filesystem usage and unmount any nilfs2 partitions
  • Implement strict access controls to prevent unauthorized local users from accessing the system

🔍 How to Verify

Check if Vulnerable:

Check if nilfs2 module is loaded: lsmod | grep nilfs2. Check kernel version against distribution advisories.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commit: grep -q '250423300b4b0335918be187ef3cade248c06e6a' /proc/version_signature (if available) or check distribution patch notes.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/kern.log or dmesg
  • System crash/reboot events

SIEM Query:

source="kernel" AND ("panic" OR "Oops" OR "nilfs2")

🔗 References

📤 Share & Export