CVE-2023-39355
📋 TL;DR
This CVE describes a use-after-free vulnerability in FreeRDP's processing of RDPGFX_CMDID_RESETGRAPHICS packets. When context->maxPlaneSize is 0, the planesBuffer is freed but the pointer isn't updated, creating an exploit vector. This affects FreeRDP 3.x beta releases before beta3 and could lead to crashes or potential remote code execution.
💻 Affected Systems
- FreeRDP
📦 What is this software?
Freerdp by Freerdp
Freerdp by Freerdp
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to full system compromise of the FreeRDP client or server.
Likely Case
Application crash (denial of service) when processing malicious RDP packets.
If Mitigated
No impact if patched or if exploit attempts are blocked by network controls.
🎯 Exploit Status
Exploitation requires sending specially crafted RDPGFX packets to trigger the use-after-free condition.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.0.0-beta3 and later
Vendor Advisory: https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-hvwj-vmg6-2f5h
Restart Required: Yes
Instructions:
1. Check current FreeRDP version: freerdp --version
2. If version is < 3.0.0-beta3, upgrade using package manager or compile from source
3. For Debian/Ubuntu: apt update && apt upgrade freerdp2
4. For RHEL/CentOS: yum update freerdp
5. Restart any FreeRDP services or applications
🔧 Temporary Workarounds
No known workarounds
allThe vendor advisory states there are no known workarounds for this vulnerability.
🧯 If You Can't Patch
- Restrict network access to FreeRDP services using firewalls to only trusted sources.
- Monitor for crash logs and unusual RDP connection attempts as indicators of exploitation.
🔍 How to Verify
Check if Vulnerable:
Run: freerdp --version | grep -E '^3\.' && echo "Check if version is < 3.0.0-beta3"
Check Version:
freerdp --version
Verify Fix Applied:
Confirm version is 3.0.0-beta3 or higher: freerdp --version
📡 Detection & Monitoring
Log Indicators:
- FreeRDP crash logs
- Segmentation fault errors in system logs
- Unexpected termination of FreeRDP processes
Network Indicators:
- Unusual RDPGFX packet patterns
- Multiple RDP connection attempts from single source
SIEM Query:
source="*freerdp*" AND ("segmentation fault" OR "crash" OR "SIGSEGV")
🔗 References
- https://github.com/FreeRDP/FreeRDP/commit/d6f9d33a7db0b346195b6a15b5b99944ba41beee
- https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-hvwj-vmg6-2f5h
- https://lists.debian.org/debian-lts-announce/2023/10/msg00008.html
- https://security.gentoo.org/glsa/202401-16
- https://github.com/FreeRDP/FreeRDP/commit/d6f9d33a7db0b346195b6a15b5b99944ba41beee
- https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-hvwj-vmg6-2f5h
- https://lists.debian.org/debian-lts-announce/2023/10/msg00008.html
- https://security.gentoo.org/glsa/202401-16