FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.22.0, urb_select_interface can free the device's MS config on error but later code still dereferences it, leading to a use after free in libusb_udev_select_interface. This vulnerability is fixed in 3.22.0.
FreeRDP versions prior to 3.22.0 contain a use-after-free vulnerability in USB device handling that could allow remote attackers to cause denial of service or potentially execute arbitrary code through crafted RDP connections. The vulnerability exists in the urb_select_interface function where device configuration memory is freed but subsequently dereferenced. This affects remote desktop sessions utilizing USB device redirection, a common feature in enterprise environments.
IMMEDIATE ACTIONS:
1. Identify all systems running FreeRDP versions prior to 3.22.0 using asset inventory and vulnerability scanning tools
2. Disable USB device redirection in RDP configurations if not operationally critical
3. Restrict RDP access to trusted networks using firewall rules and VPN requirements
4. Monitor for abnormal RDP session terminations and system crashes
PATCHING GUIDANCE:
1. Upgrade FreeRDP to version 3.22.0 or later immediately
2. Test patches in non-production environments before deployment
3. Prioritize patching for systems handling sensitive financial or government data
4. Coordinate patching with change management procedures
COMPENSATING CONTROLS (if immediate patching not possible):
1. Implement network segmentation isolating RDP servers from critical systems
2. Deploy intrusion detection systems (IDS) monitoring for RDP anomalies
3. Enable enhanced logging for RDP sessions and USB device operations
4. Implement connection limits and session timeouts
DETECTION RULES:
1. Monitor for unexpected RDP process terminations or crashes
2. Alert on USB device enumeration failures during RDP sessions
3. Track failed urb_select_interface operations in application logs
4. Monitor for multiple rapid RDP connection attempts with USB redirection
الإجراءات الفورية:
1. تحديد جميع الأنظمة التي تقوم بتشغيل إصدارات FreeRDP السابقة للإصدار 3.22.0 باستخدام أدوات جرد الأصول والمسح الضوئي للثغرات
2. تعطيل إعادة توجيه أجهزة USB في تكوينات RDP إذا لم تكن حرجة من الناحية التشغيلية
3. تقييد الوصول إلى RDP بالشبكات الموثوقة باستخدام قواعد جدار الحماية ومتطلبات VPN
4. مراقبة إنهاء جلسات RDP غير الطبيعية وأعطال النظام
إرشادات التصحيح:
1. ترقية FreeRDP إلى الإصدار 3.22.0 أو أحدث فوراً
2. اختبار التصحيحات في بيئات غير الإنتاج قبل النشر
3. إعطاء الأولوية لتصحيح الأنظمة التي تتعامل مع البيانات المالية أو الحكومية الحساسة
4. تنسيق التصحيح مع إجراءات إدارة التغيير
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تنفيذ تقسيم الشبكة لعزل خوادم RDP عن الأنظمة الحرجة
2. نشر أنظمة كشف التسلل (IDS) لمراقبة شذوذ RDP
3. تفعيل السجلات المحسنة لجلسات RDP وعمليات أجهزة USB
4. تنفيذ حدود الاتصال وانتهاء صلاحية الجلسة
قواعد الكشف:
1. مراقبة إنهاء عمليات RDP غير المتوقعة أو الأعطال
2. التنبيه على فشل تعداد أجهزة USB أثناء جلسات RDP
3. تتبع عمليات urb_select_interface الفاشلة في سجلات التطبيق
4. مراقبة محاولات اتصال RDP السريعة المتعددة مع إعادة توجيه USB