CVE-2023-34966

7.5 HIGH

📋 TL;DR

This CVE describes an infinite loop vulnerability in Samba's mdssvc RPC service for Spotlight. Attackers can send specially crafted RPC packets with a zero count value, causing the service to consume 100% CPU and resulting in denial of service. Any system running vulnerable Samba versions with Spotlight enabled is affected.

💻 Affected Systems

Products:
  • Samba
Versions: Samba versions before 4.18.6, 4.17.10, and 4.16.14
Operating Systems: Linux/Unix systems running Samba
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if Spotlight search functionality is enabled (vfs_fruit module with fruit:metadata=netatalk or fruit:resource=file).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service on the Samba server, making file shares inaccessible and consuming all CPU resources until manual intervention.

🟠

Likely Case

Service disruption on affected Samba servers, requiring restart of the smbd service to restore functionality.

🟢

If Mitigated

Minimal impact if patched or if Spotlight functionality is disabled.

🌐 Internet-Facing: MEDIUM - Requires RPC access to Samba services, which may be exposed but often filtered at perimeter.
🏢 Internal Only: HIGH - Internal attackers or compromised internal systems can easily exploit this to disrupt file sharing services.

🎯 Exploit Status

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

Exploitation requires network access to Samba's RPC service and valid Samba credentials. The vulnerability is simple to trigger with crafted packets.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Samba 4.18.6, 4.17.10, 4.16.14 or later

Vendor Advisory: https://access.redhat.com/errata/RHSA-2023:6667

Restart Required: Yes

Instructions:

1. Update Samba packages using your distribution's package manager. 2. For RHEL/CentOS: 'yum update samba'. 3. For Debian/Ubuntu: 'apt update && apt upgrade samba'. 4. Restart smbd service: 'systemctl restart smbd'.

🔧 Temporary Workarounds

Disable Spotlight functionality

linux

Disable the vfs_fruit module or Spotlight metadata sharing to prevent exploitation.

Edit smb.conf and remove or comment out 'vfs objects = fruit'
Set 'fruit:metadata = none' and 'fruit:resource = none' in smb.conf

Restrict RPC access

linux

Limit access to Samba RPC services using firewall rules.

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

  • Disable Spotlight functionality in Samba configuration
  • Implement network segmentation to restrict access to Samba servers

🔍 How to Verify

Check if Vulnerable:

Check Samba version with 'smbd --version' and compare against patched versions. Also check if Spotlight is enabled in smb.conf.

Check Version:

smbd --version

Verify Fix Applied:

Verify Samba version is 4.18.6/4.17.10/4.16.14 or later with 'smbd --version'. Test RPC functionality remains working.

📡 Detection & Monitoring

Log Indicators:

  • High CPU usage by smbd process
  • Repeated RPC connection attempts to mdssvc
  • Process restart logs for smbd service

Network Indicators:

  • Unusual RPC traffic patterns to port 445
  • Multiple malformed RPC packets to Samba services

SIEM Query:

source="samba.log" AND ("mdssvc" OR "high cpu" OR "smbd restart")

🔗 References

📤 Share & Export