FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.24.2, in persistent_cache_read_entry_v3() in libfreerdp/cache/persistent.c, persistent->bmpSize is updated before winpr_aligned_recalloc(). If realloc fails, bmpSize is inflated while bmpData points to the old buffer. This issue has been patched in version 3.24.2.
FreeRDP versions prior to 3.24.2 contain a buffer management vulnerability in persistent cache handling that could lead to memory corruption and potential code execution. The vulnerability occurs when memory reallocation fails but the size variable is updated prematurely, creating a use-after-free condition. This affects remote desktop protocol implementations widely used in Saudi enterprise environments for secure remote access.
1. IMMEDIATE ACTIONS:
- Identify all systems running FreeRDP versions prior to 3.24.2 using asset inventory tools
- Isolate or restrict network access to affected RDP services if patching cannot be completed immediately
- Monitor for suspicious RDP connection attempts and memory-related crashes
2. PATCHING GUIDANCE:
- Upgrade FreeRDP to version 3.24.2 or later immediately
- For Linux distributions: Check vendor repositories for patched packages (Ubuntu, RHEL, Debian)
- For Windows deployments: Rebuild or redeploy RDP client applications with patched FreeRDP libraries
- Test patches in non-production environments first
3. COMPENSATING CONTROLS (if immediate patching not possible):
- Implement network segmentation to restrict RDP access to trusted networks only
- Deploy VPN requirements for all remote desktop connections
- Enable RDP connection logging and monitoring
- Implement memory protection mechanisms (ASLR, DEP/NX)
4. DETECTION RULES:
- Monitor for FreeRDP process crashes with memory-related errors
- Alert on unexpected RDP session terminations
- Track failed memory allocation events in application logs
- Monitor for unusual process behavior following RDP connections
1. الإجراءات الفورية:
- تحديد جميع الأنظمة التي تعمل بإصدارات FreeRDP السابقة للإصدار 3.24.2 باستخدام أدوات جرد الأصول
- عزل أو تقييد الوصول إلى خدمات RDP المتأثرة إذا لم يكن بالإمكان إكمال التصحيح فوراً
- مراقبة محاولات اتصال RDP المريبة وأعطال الذاكرة
2. إرشادات التصحيح:
- ترقية FreeRDP إلى الإصدار 3.24.2 أو أحدث فوراً
- لتوزيعات Linux: التحقق من مستودعات البائع للحصول على الحزم المصححة
- لنشر Windows: إعادة بناء أو إعادة نشر تطبيقات عميل RDP باستخدام مكتبات FreeRDP المصححة
- اختبار التصحيحات في بيئات غير الإنتاج أولاً
3. الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
- تطبيق تقسيم الشبكة لتقييد الوصول إلى RDP للشبكات الموثوقة فقط
- نشر متطلبات VPN لجميع اتصالات سطح المكتب البعيد
- تفعيل تسجيل ومراقبة اتصالات RDP
- تطبيق آليات حماية الذاكرة (ASLR, DEP/NX)
4. قواعد الكشف:
- مراقبة أعطال عملية FreeRDP المتعلقة بالذاكرة
- التنبيه على إنهاء جلسات RDP غير المتوقعة
- تتبع أحداث فشل تخصيص الذاكرة في سجلات التطبيق
- مراقبة السلوك غير المعتاد للعملية بعد اتصالات RDP