An out-of-bounds read flaw was found in the X.Org X server and Xwayland in __glXDisp_ChangeDrawableAttributes(). A wrong size validation check can read a client-controlled number of bytes, exceeding the request buffer, leading to information disclosure. A write path also exists but requires byte-swapped clients which is disabled by default.
CVE-2026-50262 is a medium-severity out-of-bounds read vulnerability in X.Org X server and Xwayland that allows information disclosure through improper buffer size validation in the __glXDisp_ChangeDrawableAttributes() function. While no public exploit is available and patches are not yet released, the vulnerability could expose sensitive memory contents to local or remote attackers depending on X server exposure. Organizations should monitor for vendor patches and implement compensating controls to restrict X server access.
Immediate Actions:
1. Inventory all systems running X.Org X server or Xwayland (check 'X -version' or 'Xwayland --version')
2. Restrict X server access to trusted local users only; disable network X11 forwarding (set 'X11Forwarding no' in sshd_config)
3. Implement principle of least privilege for X server socket permissions (verify /tmp/.X11-unix permissions are 1777)
4. Monitor vendor security advisories (freedesktop.org, distribution maintainers) for patch availability
Compensating Controls (until patch available):
5. Run X server with reduced privileges using user namespaces if supported
6. Disable GLX extension if not required: add 'Option "Disable" "GLX"' in xorg.conf
7. Use Wayland as alternative display server where possible (if not affected by same vulnerability)
8. Implement network segmentation to isolate systems running X server from untrusted networks
Detection Rules:
9. Monitor for unusual X protocol requests to __glXDisp_ChangeDrawableAttributes() using strace or X11 protocol analyzers
10. Alert on attempts to read beyond allocated buffer sizes in X server logs
11. Track memory access patterns for X server processes using auditd rules targeting GLX operations
الإجراءات الفورية:
1. حصر جميع الأنظمة التي تقوم بتشغيل خادم X.Org أو Xwayland (تحقق من 'X -version' أو 'Xwayland --version')
2. تقييد الوصول إلى خادم X للمستخدمين المحليين الموثوقين فقط؛ تعطيل إعادة توجيه X11 عبر الشبكة (اضبط 'X11Forwarding no' في sshd_config)
3. تطبيق مبدأ الامتياز الأقل لأذونات مقبس خادم X (تحقق من أذونات /tmp/.X11-unix وهي 1777)
4. مراقبة تنبيهات الأمان من البائعين (freedesktop.org، مسؤولو التوزيع) لتوفر التصحيحات
الضوابط التعويضية (حتى توفر التصحيح):
5. تشغيل خادم X بامتيازات منخفضة باستخدام مساحات الأسماء للمستخدمين إن أمكن
6. تعطيل امتداد GLX إذا لم يكن مطلوباً: أضف 'Option "Disable" "GLX"' في xorg.conf
7. استخدام Wayland كخادم عرض بديل حيث أمكن (إذا لم تتأثر بنفس الثغرة)
8. تطبيق تقسيم الشبكة لعزل الأنظمة التي تقوم بتشغيل خادم X عن الشبكات غير الموثوقة
قواعد الكشف:
9. مراقبة طلبات بروتوكول X غير العادية إلى __glXDisp_ChangeDrawableAttributes() باستخدام strace أو محللات بروتوكول X11
10. تنبيه عند محاولات القراءة بعد حدود المخزن المؤقت المخصص في سجلات خادم X
11. تتبع أنماط الوصول إلى الذاكرة لعمليات خادم X باستخدام قواعد auditd التي تستهدف عمليات GLX