In the Linux kernel, the following vulnerability has been resolved:
misc: fastrpc: possible double-free of cctx->remote_heap
fastrpc_init_create_static_process() may free cctx->remote_heap on the
err_map path but does not clear the pointer. Later, fastrpc_rpmsg_remove()
frees cctx->remote_heap again if it is non-NULL, which can lead to a
double-free if the INIT_CREATE_STATIC ioctl hits the error path and the rpmsg
device is subsequently removed/unbound.
Clear cctx->remote_heap after freeing it in the error path to prevent the
later cleanup from freeing it again.
This issue was found by an in-house analysis workflow that extracts AST-based
information and runs static checks, with LLM assistance for triage, and was
confirmed by manual code review.
No hardware testing was performed.
CVE-2026-31730 is a double-free vulnerability in the Linux kernel's fastrpc driver that occurs when the INIT_CREATE_STATIC ioctl fails and the rpmsg device is subsequently removed. The vulnerability allows local attackers to trigger a kernel crash or potentially execute arbitrary code with kernel privileges. This affects Linux kernel versions up to 7.0-rc6 and requires local access to trigger.
Immediate Actions:
1. Identify all Linux systems running kernel versions up to 7.0-rc6, particularly those with fastrpc driver enabled
2. Restrict local user access to /dev/fastrpc* devices using file permissions (chmod 600) and SELinux policies
3. Disable fastrpc module if not required: echo 'blacklist fastrpc' >> /etc/modprobe.d/blacklist.conf
4. Monitor system logs for fastrpc-related errors and kernel panics
Patching Guidance:
1. Apply kernel patches from upstream Linux repository that include the fix clearing cctx->remote_heap pointer
2. For RHEL/CentOS systems: Update to patched kernel versions when available from Red Hat
3. For Ubuntu systems: Apply security updates from Canonical when released
4. Test patches in non-production environments before deployment
Compensating Controls:
1. Implement AppArmor or SELinux profiles restricting fastrpc device access
2. Use Linux Security Modules (LSM) to prevent unprivileged ioctl calls to fastrpc
3. Deploy kernel module signing and verification to prevent unauthorized module loading
4. Enable kernel address space layout randomization (ASLR) and stack canaries
Detection Rules:
1. Monitor kernel logs for 'fastrpc' error messages and double-free warnings
2. Alert on unexpected kernel panic/oops messages containing 'fastrpc' or 'remote_heap'
3. Track failed INIT_CREATE_STATIC ioctl calls followed by rpmsg device removal events
4. Monitor /dev/fastrpc* device access patterns from unprivileged processes
الإجراءات الفورية:
1. تحديد جميع أنظمة Linux التي تعمل بإصدارات النواة حتى 7.0-rc6، خاصة تلك التي تحتوي على برنامج تشغيل fastrpc مفعل
2. تقييد وصول المستخدم المحلي إلى أجهزة /dev/fastrpc* باستخدام أذونات الملفات (chmod 600) وسياسات SELinux
3. تعطيل وحدة fastrpc إذا لم تكن مطلوبة: echo 'blacklist fastrpc' >> /etc/modprobe.d/blacklist.conf
4. مراقبة سجلات النظام للأخطاء المتعلقة بـ fastrpc وأعطال النواة
إرشادات التصحيح:
1. تطبيق تصحيحات النواة من مستودع Linux الأساسي التي تتضمن إصلاح مؤشر cctx->remote_heap
2. لأنظمة RHEL/CentOS: التحديث إلى إصدارات النواة المصححة عند توفرها من Red Hat
3. لأنظمة Ubuntu: تطبيق تحديثات الأمان من Canonical عند إصدارها
4. اختبار التصحيحات في بيئات غير الإنتاج قبل النشر
الضوابط البديلة:
1. تنفيذ ملفات تعريف AppArmor أو SELinux تقيد وصول جهاز fastrpc
2. استخدام وحدات أمان Linux (LSM) لمنع استدعاءات ioctl غير المصرح بها إلى fastrpc
3. تفعيل توقيع وحدة النواة والتحقق منها لمنع تحميل الوحدات غير المصرح بها
4. تفعيل عشوائية تخطيط مساحة العناوين (ASLR) وحماية مكدس البيانات
قواعد الكشف:
1. مراقبة سجلات النواة للأخطاء المتعلقة بـ 'fastrpc' وتحذيرات التحرير المزدوج
2. التنبيه على رسائل انهيار/oops النواة غير المتوقعة التي تحتوي على 'fastrpc' أو 'remote_heap'
3. تتبع استدعاءات INIT_CREATE_STATIC ioctl الفاشلة متبوعة بأحداث إزالة جهاز rpmsg
4. مراقبة أنماط وصول جهاز /dev/fastrpc* من العمليات غير المميزة