CVE-2024-56729

4.7 MEDIUM

📋 TL;DR

This CVE describes a memory leak vulnerability in the Linux kernel's SMB client implementation. When a lease break races with opening a cached directory, the system fails to properly release a reference to a tcon (tree connection) structure, causing a memory leak. This affects Linux systems using SMB file sharing.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Specific affected versions not specified in CVE, but patches exist for stable kernel branches.
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using SMB/CIFS client functionality. Requires SMB file sharing operations.

📦 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

Sustained exploitation could lead to kernel memory exhaustion, causing system instability, crashes, or denial of service.

🟠

Likely Case

Gradual memory consumption over time leading to performance degradation, particularly on systems with frequent SMB operations.

🟢

If Mitigated

Minimal impact with proper monitoring and memory limits in place.

🌐 Internet-Facing: LOW - Requires SMB access and specific timing conditions.
🏢 Internal Only: MEDIUM - Internal SMB clients could be affected during normal file operations.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH - Requires specific timing conditions (race condition) and SMB access.

Exploitation requires triggering a lease break race condition during cached directory operations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel branches via provided git commits

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

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version. 2. Check distribution-specific security advisories. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable SMB client caching

linux

Prevents the race condition by disabling directory caching for SMB operations

echo 0 > /proc/fs/cifs/cachedOpen

Restrict SMB access

linux

Limit SMB connections to trusted sources only

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

🧯 If You Can't Patch

  • Implement memory monitoring and alerting for kernel memory usage
  • Restrict SMB client usage to essential operations only

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with patched versions from kernel git commits

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes one of the fix commits: 1b9ab6b648f89441c8a13cb3fd8ca83ffebc5262 or related patches

📡 Detection & Monitoring

Log Indicators:

  • Kernel oom-killer events
  • Increasing kernel memory usage in /proc/meminfo
  • SMB connection errors

Network Indicators:

  • Unusual SMB traffic patterns
  • Multiple SMB lease break requests

SIEM Query:

source="kernel" AND ("oom" OR "memory" OR "SMB")

🔗 References

📤 Share & Export