In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: validate connector number in ucsi_notify_common()
The connector number extracted from CCI via UCSI_CCI_CONNECTOR() is a
7-bit field (0-127) that is used to index into the connector array in
ucsi_connector_change(). However, the array is only allocated for the
number of connectors reported by the device (typically 2-4 entries).
A malicious or malfunctioning device could report an out-of-range
connector number in the CCI, causing an out-of-bounds array access in
ucsi_connector_change().
Add a bounds check in ucsi_notify_common(), the central point where CCI
is parsed after arriving from hardware, so that bogus connector numbers
are rejected before they propagate further.
CVE-2026-31729 is a high-severity out-of-bounds array access vulnerability in the Linux kernel's USB Type-C UCSI driver. A malicious or malfunctioning USB device could send a crafted connector number in the CCI field, causing kernel memory corruption and potential denial of service or privilege escalation. The vulnerability affects Linux kernel versions up to 7.0-rc6 and requires a malicious USB device to be connected to the system.
Immediate Actions:
1. Identify all Linux systems running kernel versions prior to 7.0 with USB Type-C UCSI support enabled
2. Restrict physical USB port access to trusted devices only; implement USB port locks or disable unused ports
3. Monitor system logs for kernel panics or memory corruption errors related to USB subsystem
Patching Guidance:
1. Apply the latest stable kernel patch that includes the ucsi_notify_common() bounds check validation
2. For production systems, test patches in staging environment before deployment
3. Prioritize patching for systems in DMZ or with external USB connectivity
4. Update to Linux kernel 7.0 final release or later when available
Compensating Controls (if immediate patching not possible):
1. Disable USB Type-C UCSI driver if not required: echo 'blacklist typec_ucsi' >> /etc/modprobe.d/blacklist.conf
2. Implement kernel module signing and secure boot to prevent unauthorized driver loading
3. Use SELinux or AppArmor policies to restrict USB device access
4. Deploy USB device whitelisting via udev rules
Detection Rules:
1. Monitor kernel logs for: 'ucsi_notify_common' errors or 'connector number out of range' messages
2. Alert on kernel panic messages containing 'usb', 'typec', or 'ucsi'
3. Monitor for unexpected USB device enumeration attempts
4. Track failed USB device initialization events in syslog
الإجراءات الفورية:
1. تحديد جميع أنظمة Linux التي تعمل بإصدارات نواة سابقة للإصدار 7.0 مع تفعيل دعم UCSI من نوع USB-C
2. تقييد الوصول المادي لمنافذ USB للأجهزة الموثوقة فقط؛ تطبيق أقفال منافذ USB أو تعطيل المنافذ غير المستخدمة
3. مراقبة سجلات النظام للبحث عن أعطال النواة أو أخطاء تلف الذاكرة المتعلقة بنظام USB الفرعي
إرشادات التصحيح:
1. تطبيق أحدث تصحيح نواة مستقر يتضمن التحقق من حدود ucsi_notify_common()
2. بالنسبة للأنظمة الإنتاجية، اختبر التصحيحات في بيئة التجريب قبل النشر
3. أولويات التصحيح للأنظمة في DMZ أو التي تحتوي على اتصالية USB خارجية
4. التحديث إلى إصدار نواة Linux 7.0 النهائي أو أحدث عند توفره
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تعطيل برنامج تشغيل UCSI من نوع USB-C إذا لم يكن مطلوباً
2. تطبيق توقيع وحدة النواة والتحقق الآمن لمنع تحميل برنامج التشغيل غير المصرح به
3. استخدام سياسات SELinux أو AppArmor لتقييد الوصول إلى أجهزة USB
4. نشر قائمة بيضاء لأجهزة USB عبر قواعد udev
قواعد الكشف:
1. مراقبة سجلات النواة للبحث عن أخطاء 'ucsi_notify_common' أو رسائل 'رقم الموصل خارج النطاق'
2. التنبيه على رسائل انهيار النواة التي تحتوي على 'usb' أو 'typec' أو 'ucsi'
3. مراقبة محاولات تعداد أجهزة USB غير المتوقعة
4. تتبع أحداث فشل تهيئة جهاز USB في syslog