CVE-2025-38232

4.7 MEDIUM

📋 TL;DR

A race condition in the Linux kernel's NFS daemon (nfsd) between module registration and exports_proc interface creation can cause kernel NULL pointer dereferences or OOPs (kernel crashes). This affects systems running vulnerable Linux kernel versions with NFS server functionality enabled. The vulnerability is triggered by concurrent operations like exporting filesystems and mounting NFS daemon interfaces.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Multiple versions including 5.4 through at least 6.14 (specifically mentioned: 5.4 and 6.14)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when nfsd module is loaded and NFS server functionality is used. Systems not using NFS server are not affected.

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

⚠️ 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 instability or kernel crashes when NFS operations are performed concurrently during nfsd module loading/unloading.

🟢

If Mitigated

Minor performance impact or failed NFS operations without system crash if race condition is avoided.

🌐 Internet-Facing: LOW - Requires local access or NFS server exposure with specific concurrent operations.
🏢 Internal Only: MEDIUM - Internal users or automated processes could trigger the race condition on NFS servers.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

The provided script demonstrates reliable reproduction. Exploitation requires ability to load/unload nfsd module and perform NFS operations concurrently.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patched in kernel commits referenced in CVE (multiple stable tree commits provided)

Vendor Advisory: https://git.kernel.org/stable/c/2029ca75cdfa6a25716a5a76b751486cce7e3822

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from distribution vendor. 2. Reboot system to load new kernel. 3. Verify nfsd module loads without issues.

🔧 Temporary Workarounds

Avoid concurrent nfsd operations

linux

Prevent simultaneous nfsd module operations and NFS export commands

# Use process coordination or locks when performing nfsd operations
# Avoid running exportfs -r while mounting/unmounting nfsd

Disable nfsd if not needed

linux

Remove nfsd module and disable NFS server functionality

rmmod nfsd
systemctl disable nfs-server
echo 'blacklist nfsd' >> /etc/modprobe.d/blacklist.conf

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from loading/unloading kernel modules
  • Monitor for concurrent nfsd operations and implement rate limiting or serialization

🔍 How to Verify

Check if Vulnerable:

Check kernel version and test with reproduction script: while true; do exportfs -r; done & while true; do insmod nfsd; mount -t nfsd none /proc/fs/nfsd; umount /proc/fs/nfsd; rmmod nfsd; done &

Check Version:

uname -r

Verify Fix Applied:

After patching, run the reproduction script and verify no kernel crashes occur. Check dmesg for absence of NULL pointer dereference errors.

📡 Detection & Monitoring

Log Indicators:

  • Kernel NULL pointer dereference messages in dmesg
  • OOPs (kernel panic) logs mentioning exports_net_open or cache_seq_next_rcu
  • NFS daemon crash logs

Network Indicators:

  • Unexpected NFS service interruptions
  • Failed NFS mount operations

SIEM Query:

source="kernel" AND ("NULL pointer dereference" OR "OOPs" OR "exports_net_open" OR "cache_seq_next_rcu")

🔗 References

📤 Share & Export