In the Linux kernel, the following vulnerability has been resolved:
rxrpc: Fix missing validation of ticket length in non-XDR key preparsing
In rxrpc_preparse(), there are two paths for parsing key payloads: the
XDR path (for large payloads) and the non-XDR path (for payloads <= 28
bytes). While the XDR path (rxrpc_preparse_xdr_rxkad()) correctly
validates the ticket length against AFSTOKEN_RK_TIX_MAX, the non-XDR
path fails to do so.
This allows an unprivileged user to provide a very large ticket length.
When this key is later read via rxrpc_read(), the total
token size (toksize) calculation results in a value that exceeds
AFSTOKEN_LENGTH_MAX, triggering a WARN_ON().
[ 2001.302904] WARNING: CPU: 2 PID: 2108 at net/rxrpc/key.c:778 rxrpc_read+0x109/0x5c0 [rxrpc]
Fix this by adding a check in the non-XDR parsing path of rxrpc_preparse()
to ensure the ticket length does not exceed AFSTOKEN_RK_TIX_MAX,
bringing it into parity with the XDR parsing logic.
CVE-2026-31696 is a buffer overflow vulnerability in the Linux kernel's rxrpc subsystem that allows unprivileged users to bypass ticket length validation in the non-XDR key preparsing path. This can trigger kernel warnings and potentially lead to denial of service or memory corruption. The vulnerability affects Linux kernel versions including 7.1-rc1 and 7.1-rc2, with a CVSS score of 7.8 (high severity).
Immediate Actions:
1. Identify all Linux systems running kernel versions 7.1-rc1, 7.1-rc2, or other affected versions using 'uname -r'
2. Restrict local user access to rxrpc key management interfaces
3. Monitor system logs for WARN_ON messages related to rxrpc_read() at net/rxrpc/key.c:778
Patching Guidance:
1. Apply the official Linux kernel patch that adds ticket length validation to rxrpc_preparse() non-XDR path
2. Ensure the patch validates ticket length against AFSTOKEN_RK_TIX_MAX constant
3. Test patches in non-production environments before deployment
4. Schedule kernel updates during maintenance windows
Compensating Controls (if immediate patching unavailable):
1. Disable rxrpc module if not required: 'echo 'install rxrpc /bin/true' >> /etc/modprobe.d/disable-rxrpc.conf'
2. Implement AppArmor/SELinux profiles to restrict key operations
3. Use kernel module signing to prevent unauthorized module loading
4. Implement audit logging for key operations: 'auditctl -w /proc/sys/net/rxrpc/ -p wa -k rxrpc_changes'
Detection Rules:
1. Monitor for WARN_ON messages: grep 'WARNING.*rxrpc_read' /var/log/kern.log
2. Track failed key operations: ausearch -k rxrpc_changes
3. Alert on attempts to create oversized rxrpc keys
4. Monitor for local privilege escalation attempts targeting rxrpc
الإجراءات الفورية:
1. تحديد جميع أنظمة Linux التي تعمل بإصدارات kernel 7.1-rc1 أو 7.1-rc2 أو الإصدارات المتأثرة الأخرى باستخدام 'uname -r'
2. تقييد وصول المستخدمين المحليين إلى واجهات إدارة مفاتيح rxrpc
3. مراقبة سجلات النظام للبحث عن رسائل WARN_ON المتعلقة بـ rxrpc_read() في net/rxrpc/key.c:778
إرشادات التصحيح:
1. تطبيق رقعة Linux kernel الرسمية التي تضيف التحقق من طول التذكرة إلى مسار non-XDR في rxrpc_preparse()
2. التأكد من أن الرقعة تتحقق من طول التذكرة مقابل ثابت AFSTOKEN_RK_TIX_MAX
3. اختبار الرقع في بيئات غير الإنتاج قبل النشر
4. جدولة تحديثات kernel خلال نوافذ الصيانة
الضوابط البديلة (إذا لم يكن التصحيح الفوري متاحاً):
1. تعطيل وحدة rxrpc إذا لم تكن مطلوبة: 'echo 'install rxrpc /bin/true' >> /etc/modprobe.d/disable-rxrpc.conf'
2. تنفيذ ملفات تعريف AppArmor/SELinux لتقييد عمليات المفاتيح
3. استخدام توقيع وحدات kernel لمنع تحميل الوحدات غير المصرح بها
4. تنفيذ تسجيل التدقيق لعمليات المفاتيح: 'auditctl -w /proc/sys/net/rxrpc/ -p wa -k rxrpc_changes'
قواعد الكشف:
1. مراقبة رسائل WARN_ON: grep 'WARNING.*rxrpc_read' /var/log/kern.log
2. تتبع عمليات المفاتيح الفاشلة: ausearch -k rxrpc_changes
3. التنبيه على محاولات إنشاء مفاتيح rxrpc كبيرة الحجم
4. مراقبة محاولات تصعيد الامتيازات المحلية التي تستهدف rxrpc