CVE-2020-35512
📋 TL;DR
A use-after-free vulnerability in D-Bus allows memory corruption when multiple usernames share the same UID and have policy rules referencing them. This can cause crashes or undefined behavior, potentially leading to denial of service or code execution. Systems running affected D-Bus versions with shared UID configurations are vulnerable.
💻 Affected Systems
- D-Bus
📦 What is this software?
Dbus by Freedesktop
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to full system compromise if memory corruption can be weaponized
Likely Case
Denial of service through D-Bus daemon crashes, disrupting inter-process communication
If Mitigated
Minimal impact if shared UID configurations are avoided and proper access controls exist
🎯 Exploit Status
Requires specific shared UID configuration and policy rules; exploitation details not publicly documented
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Development branch: 1.13.17+, stable branch: 1.12.19+, older branches: 1.10.31+
Vendor Advisory: https://gitlab.freedesktop.org/dbus/dbus/-/issues/305
Restart Required: Yes
Instructions:
1. Update D-Bus package using system package manager (apt/yum/dnf/zypper). 2. Restart D-Bus daemon: 'systemctl restart dbus'. 3. Verify version with 'dbus-daemon --version'.
🔧 Temporary Workarounds
Avoid shared UID configurations
linuxEnsure no usernames share the same UID on the system
cat /etc/passwd | cut -d: -f3 | sort -n | uniq -d
Restrict D-Bus policy rules
linuxReview and remove unnecessary policy rules referencing usernames
grep -r "<user>" /etc/dbus-1/
🧯 If You Can't Patch
- Audit system for shared UID configurations and eliminate them
- Implement strict access controls to limit who can modify D-Bus policy files
🔍 How to Verify
Check if Vulnerable:
Check D-Bus version with 'dbus-daemon --version' and verify if system has shared UIDs with 'cat /etc/passwd | cut -d: -f3 | sort -n | uniq -d'
Check Version:
dbus-daemon --version
Verify Fix Applied:
Confirm D-Bus version is patched (1.13.17+, 1.12.19+, or 1.10.31+) and no shared UIDs exist
📡 Detection & Monitoring
Log Indicators:
- D-Bus daemon crashes in system logs
- Segmentation fault errors related to dbus-daemon
Network Indicators:
- Unusual D-Bus communication patterns
SIEM Query:
process.name="dbus-daemon" AND (event.action="segmentation_fault" OR event.action="crash")
🔗 References
- https://bugs.gentoo.org/755392
- https://bugzilla.redhat.com/show_bug.cgi?id=1909101
- https://gitlab.freedesktop.org/dbus/dbus/-/issues/305#note_829128
- https://security-tracker.debian.org/tracker/CVE-2020-35512
- https://bugs.gentoo.org/755392
- https://bugzilla.redhat.com/show_bug.cgi?id=1909101
- https://gitlab.freedesktop.org/dbus/dbus/-/issues/305#note_829128
- https://security-tracker.debian.org/tracker/CVE-2020-35512