In the Linux kernel, the following vulnerability has been resolved:
procfs: fix possible double mmput() in do_procmap_query()
When user provides incorrectly sized buffer for build ID for PROCMAP_QUERY
we return with -ENAMETOOLONG error. After recent changes this condition
happens later, after we unlocked mmap_lock/per-VMA lock and did mmput(),
so original goto out is now wrong and will double-mmput() mm_struct. Fix
by jumping further to clean up only vm_file and name_buf.
A double-free vulnerability in Linux kernel's procfs PROCMAP_QUERY handler causes kernel memory corruption when users provide incorrectly sized buffers for build IDs. This can lead to kernel crashes or potential privilege escalation on affected systems. The vulnerability affects Linux kernel versions including 6.19 and requires immediate patching for production systems.
Immediate Actions:
1. Identify all Linux systems running kernel versions 6.19 and earlier in your environment
2. Assess exposure: prioritize systems with multi-user access or containerized workloads
3. Implement access controls to restrict PROCMAP_QUERY usage via seccomp/AppArmor if patching is delayed
Patching Guidance:
1. Apply Linux kernel security updates from your distribution (RHEL, Ubuntu, SLES, etc.) immediately
2. For RHEL/CentOS: yum update kernel && reboot
3. For Ubuntu: apt update && apt upgrade linux-image-generic && reboot
4. Verify patch application: uname -r should show updated kernel version
Compensating Controls (if immediate patching unavailable):
1. Restrict /proc access: chmod 700 /proc for sensitive systems
2. Disable unprivileged PROCMAP_QUERY via sysctl: kernel.unprivileged_userns_clone=0
3. Monitor for exploitation attempts using auditd rules targeting procfs access
4. Implement container security policies restricting /proc access
Detection Rules:
1. Monitor for PROCMAP_QUERY syscalls with oversized buffer parameters
2. Alert on kernel oops/panic messages related to mmput() or mm_struct corruption
3. Track failed /proc/[pid]/maps_query operations returning -ENAMETOOLONG
4. Monitor for unexpected kernel memory access violations in audit logs
الإجراءات الفورية:
1. تحديد جميع أنظمة لينكس التي تعمل بإصدارات نواة 6.19 وأقدم في بيئتك
2. تقييم التعرض: إعطاء الأولوية للأنظمة ذات الوصول متعدد المستخدمين أو أحمال العمل المحتوية
3. تطبيق عناصر التحكم في الوصول لتقييد استخدام PROCMAP_QUERY عبر seccomp/AppArmor إذا تأخر التصحيح
إرشادات التصحيح:
1. تطبيق تحديثات أمان نواة لينكس من توزيعتك (RHEL, Ubuntu, SLES, إلخ) فوراً
2. لـ RHEL/CentOS: yum update kernel && reboot
3. لـ Ubuntu: apt update && apt upgrade linux-image-generic && reboot
4. التحقق من تطبيق التصحيح: uname -r يجب أن يظهر إصدار النواة المحدث
عناصر التحكم البديلة (إذا تعذر التصحيح الفوري):
1. تقييد وصول /proc: chmod 700 /proc للأنظمة الحساسة
2. تعطيل PROCMAP_QUERY غير المميز عبر sysctl: kernel.unprivileged_userns_clone=0
3. مراقبة محاولات الاستغلال باستخدام قواعد auditd التي تستهدف وصول procfs
4. تطبيق سياسات أمان الحاويات التي تقيد وصول /proc
قواعد الكشف:
1. مراقبة استدعاءات PROCMAP_QUERY syscalls مع معاملات المخزن المؤقت الكبيرة
2. التنبيه على رسائل kernel oops/panic المتعلقة بتلف mmput() أو mm_struct
3. تتبع عمليات /proc/[pid]/maps_query الفاشلة التي تعيد -ENAMETOOLONG
4. مراقبة انتهاكات وصول ذاكرة النواة غير المتوقعة في سجلات التدقيق