CVE-2023-3865

7.1 HIGH

📋 TL;DR

A Linux kernel vulnerability in the ksmbd SMB server allows out-of-bounds read via specially crafted SMB2 write requests. This could lead to information disclosure or system crashes. Systems running affected Linux kernel versions with ksmbd enabled are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel with ksmbd module
Versions: Specific kernel versions with vulnerable ksmbd commits; check git references for exact ranges
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if ksmbd (kernel SMB server) is enabled and loaded. 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 memory disclosure leading to sensitive information exposure, potential privilege escalation, or system crash/DoS.

🟠

Likely Case

Information disclosure from kernel memory or system instability/crash.

🟢

If Mitigated

Minimal impact if ksmbd is disabled or proper network segmentation isolates SMB traffic.

🌐 Internet-Facing: MEDIUM - Requires SMB access, but SMB should not be internet-facing. If exposed, risk increases significantly.
🏢 Internal Only: MEDIUM - Internal attackers with network access to ksmbd could exploit this vulnerability.

🎯 Exploit Status

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

Requires SMB write access to ksmbd server. Exploitation depends on memory layout and requires crafting specific SMB2 packets.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with fixes from git references: 3813eee5154d6a4c5875cb4444cb2b63bac8947f and related commits

Vendor Advisory: https://git.kernel.org/stable/c/3813eee5154d6a4c5875cb4444cb2b63bac8947f

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Disable ksmbd module

linux

Prevent loading of 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 ksmbd SMB port (typically 445)

iptables -A INPUT -p tcp --dport 445 -j DROP
iptables -A INPUT -p tcp --dport 445 -s trusted_network -j ACCEPT

🧯 If You Can't Patch

  • Disable ksmbd module if not required for functionality
  • Implement strict network segmentation to isolate SMB traffic from untrusted networks

🔍 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:

After patching, verify kernel version and ensure ksmbd module loads without errors if needed.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic or oops messages related to ksmbd
  • SMB write requests with unusual NextCommand values

Network Indicators:

  • Unusual SMB2 write packet patterns
  • Multiple failed SMB connections followed by crashes

SIEM Query:

source="kernel" AND ("ksmbd" OR "SMB2") AND ("panic" OR "Oops" OR "general protection fault")

🔗 References

📤 Share & Export