Incus is a system container and virtual machine manager. Incus provides an API to retrieve VM screenshots. That API relies on the use of a temporary file for QEMU to write the screenshot to which is then picked up and sent to the user prior to deletion. As versions prior to 6.23.0 use predictable paths under /tmp for this, an attacker with local access to the system can abuse this mechanism by creating their own symlinks ahead of time. On the vast majority of Linux systems, this will result in a "Permission denied" error when requesting a screenshot. That's because the Linux kernel has a security feature designed to block such attacks, `protected_symlinks`. On the rare systems with this purposefully disabled, it's then possible to trick Incus intro truncating and altering the mode and permissions of arbitrary files on the filesystem, leading to a potential denial of service or possible local privilege escalation. Version 6.23.0 fixes the issue.
CVE-2026-33711 is a local privilege escalation vulnerability in Incus versions prior to 6.23.0 that exploits predictable temporary file paths in the VM screenshot API. An attacker with local system access can create symlinks to manipulate arbitrary files, potentially leading to denial of service or privilege escalation on systems with disabled symlink protection. The vulnerability has an available exploit and affects containerization infrastructure commonly used in Saudi cloud and virtualization environments.
IMMEDIATE ACTIONS:
1. Identify all Incus installations in your environment using: incus --version
2. Audit systems with Incus versions < 6.23.0 for exposure
3. Restrict local system access and container escape vectors
4. Review /tmp directory permissions and monitor for suspicious symlink creation
PATCHING GUIDANCE:
1. Upgrade Incus to version 6.23.0 or later immediately
2. For systems unable to patch immediately, disable VM screenshot API functionality if not required
3. Verify kernel parameter net.ipv4.conf.all.protected_symlinks = 1 is enabled (default on most systems)
4. Test protected_symlinks status: cat /proc/sys/fs/protected_symlinks (should return 1)
COMPENSATING CONTROLS:
1. Implement strict file system permissions on /tmp (mode 1777 with sticky bit)
2. Monitor /tmp for suspicious symlink creation using auditd rules:
- auditctl -w /tmp -p wa -k tmp_monitoring
3. Restrict local access to Incus API endpoints
4. Implement container security policies to prevent container-to-host access
5. Use AppArmor or SELinux profiles to restrict Incus process capabilities
DETECTION RULES:
1. Monitor for symlink creation in /tmp: auditctl -a always,exit -F dir=/tmp -F perm=w -F auid>=1000 -k symlink_creation
2. Alert on Incus screenshot API calls from non-standard sources
3. Monitor file permission/ownership changes on critical system files
4. Track failed file access attempts with EACCES errors in Incus logs
الإجراءات الفورية:
1. حدد جميع تثبيتات Incus في بيئتك باستخدام: incus --version
2. قم بتدقيق الأنظمة التي تحتوي على إصدارات Incus < 6.23.0 للتعرض
3. قيد الوصول المحلي للنظام وناقلات هروب الحاويات
4. راجع أذونات دليل /tmp وراقب إنشاء الروابط الرمزية المريبة
إرشادات التصحيح:
1. قم بترقية Incus إلى الإصدار 6.23.0 أو أحدث على الفور
2. بالنسبة للأنظمة غير القادرة على التصحيح فوراً، قم بتعطيل وظيفة واجهة برمجة تطبيقات لقطات الآلات الافتراضية إذا لم تكن مطلوبة
3. تحقق من أن معامل kernel net.ipv4.conf.all.protected_symlinks = 1 مفعل (الافتراضي على معظم الأنظمة)
4. اختبر حالة protected_symlinks: cat /proc/sys/fs/protected_symlinks (يجب أن يعود 1)
الضوابط البديلة:
1. تنفيذ أذونات نظام الملفات الصارمة على /tmp (الوضع 1777 مع sticky bit)
2. مراقبة /tmp لإنشاء الروابط الرمزية المريبة باستخدام قواعد auditd
3. تقييد الوصول المحلي إلى نقاط نهاية واجهة برمجة تطبيقات Incus
4. تنفيذ سياسات أمان الحاويات لمنع وصول الحاويات إلى المضيف
5. استخدام ملفات تعريف AppArmor أو SELinux لتقييد قدرات عملية Incus
قواعد الكشف:
1. مراقبة إنشاء الروابط الرمزية في /tmp
2. تنبيهات على استدعاءات واجهة برمجة تطبيقات لقطات Incus من مصادر غير قياسية
3. مراقبة تغييرات أذونات/ملكية الملفات على ملفات النظام الحرجة
4. تتبع محاولات الوصول إلى الملفات الفاشلة في سجلات Incus