CVE-2025-21994

5.5 MEDIUM

📋 TL;DR

This CVE-2025-21994 is a Linux kernel vulnerability in the ksmbd SMB server component where improper validation of the num_aces field in SMB ACL parsing could lead to memory allocation issues. Attackers could potentially cause denial of service or memory corruption by sending specially crafted SMB requests. Systems running affected Linux kernel versions with ksmbd enabled are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel with ksmbd module
Versions: Specific affected kernel versions not specified in CVE, but patches exist in stable kernel trees
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if ksmbd (kernel SMB server) module is loaded and enabled. 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 →

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 or system crash leading to denial of service, with potential for memory corruption that could be leveraged for privilege escalation.

🟠

Likely Case

Denial of service through kernel crash or system instability when processing malicious SMB requests.

🟢

If Mitigated

No impact if ksmbd is disabled or proper network segmentation prevents access to SMB services.

🌐 Internet-Facing: MEDIUM - Requires SMB service exposure and ksmbd enabled, but SMB should not typically be internet-facing.
🏢 Internal Only: MEDIUM - Internal attackers with network access to SMB services could exploit this vulnerability.

🎯 Exploit Status

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

Exploitation requires sending specially crafted SMB packets to the ksmbd service. No public exploit code available at this time.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel trees (see git references in CVE)

Vendor Advisory: https://git.kernel.org/stable/c/1b8b67f3c5e5169535e26efedd3e422172e2db64

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution's repositories. 2. Reboot system to load new kernel. 3. Verify ksmbd module loads correctly if needed.

🔧 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

Restrict SMB network access

linux

Use firewall rules to limit 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 module if not required for business operations
  • Implement strict network segmentation to isolate SMB services from untrusted networks

🔍 How to Verify

Check if Vulnerable:

Check if ksmbd module is loaded: lsmod | grep ksmbd. If loaded and kernel version is unpatched, system is vulnerable.

Check Version:

uname -r

Verify Fix Applied:

Check kernel version against patched versions from distribution vendor, and verify ksmbd module functions normally after update.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • ksmbd crash logs in dmesg or journalctl
  • Unexpected SMB connection attempts

Network Indicators:

  • Unusual SMB traffic patterns
  • Multiple failed SMB connection attempts

SIEM Query:

source="kernel" AND ("panic" OR "Oops") OR source="ksmbd" AND ("error" OR "crash")

🔗 References

📤 Share & Export