CVE-2025-22037

5.5 MEDIUM

📋 TL;DR

A null pointer dereference vulnerability in the Linux kernel's ksmbd SMB server allows attackers to crash the kernel by sending a malformed SMB2 negotiate request followed by a session setup request. This affects Linux systems running ksmbd (in-kernel SMB server) with the vulnerable code. The vulnerability can lead to denial of service.

💻 Affected Systems

Products:
  • Linux kernel with ksmbd module
Versions: Linux kernel versions with vulnerable ksmbd code (specific commit ranges in references)
Operating Systems: Linux distributions with ksmbd enabled
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if ksmbd module is loaded and SMB service is running. Many distributions don't enable ksmbd 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash and complete denial of service, requiring physical or remote console access to reboot.

🟠

Likely Case

Kernel crash causing service disruption and potential data loss for active SMB connections.

🟢

If Mitigated

Minimal impact if ksmbd is not enabled or if network access is restricted.

🌐 Internet-Facing: MEDIUM - Exploitable remotely via SMB protocol, but requires ksmbd to be enabled and exposed.
🏢 Internal Only: MEDIUM - Internal attackers could crash systems running ksmbd services.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending specific malformed SMB packets. No authentication needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commits 8f216b33a5e1b3489c073b1ea1b3d7cb63c8dc4d and related fixes

Vendor Advisory: https://git.kernel.org/stable/c/8f216b33a5e1b3489c073b1ea1b3d7cb63c8dc4d

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix. 2. Reboot system. 3. Verify ksmbd module loads the patched version.

🔧 Temporary Workarounds

Disable ksmbd module

linux

Prevent loading of the vulnerable ksmbd kernel module

echo 'blacklist ksmbd' >> /etc/modprobe.d/blacklist-ksmbd.conf
rmmod ksmbd

Block SMB ports at firewall

linux

Prevent external access to SMB services

iptables -A INPUT -p tcp --dport 445 -j DROP
iptables -A INPUT -p tcp --dport 139 -j DROP

🧯 If You Can't Patch

  • Disable ksmbd service if not required
  • Implement network segmentation to restrict SMB access to trusted hosts only

🔍 How to Verify

Check if Vulnerable:

Check if ksmbd module is loaded: lsmod | grep ksmbd. If loaded, check kernel version against patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits: uname -r and check git commit history. Confirm ksmbd module version.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/messages or dmesg
  • ksmbd crash logs
  • Unexpected SMB negotiate failures

Network Indicators:

  • Malformed SMB2 negotiate packets followed by session setup requests
  • Unusual SMB traffic patterns

SIEM Query:

source="kernel" AND "panic" OR "Oops" AND "ksmbd" OR source="ksmbd" AND "error"

🔗 References

📤 Share & Export