In the Linux kernel, the following vulnerability has been resolved:
ublk: fix use-after-free in ublk_partition_scan_work
A race condition exists between the async partition scan work and device
teardown that can lead to a use-after-free of ub->ub_disk:
1. ublk_ctrl_start_dev() schedules partition_scan_work after add_disk()
2. ublk_stop_dev() calls ublk_stop_dev_unlocked() which does:
- del_gendisk(ub->ub_disk)
- ublk_detach_disk() sets ub->ub_disk = NULL
- put_disk() which may free the disk
3. The worker ublk_partition_scan_work() then dereferences ub->ub_disk
leading to UAF
Fix this by using ublk_get_disk()/ublk_put_disk() in the worker to hold
a reference to the disk during the partition scan. The spinlock in
ublk_get_disk() synchronizes with ublk_detach_disk() ensuring the worker
either gets a valid reference or sees NULL and exits early.
Also change flush_work() to cancel_work_sync() to avoid running the
partition scan work unnecessarily when the disk is already detached.
CVE-2026-22995 is a use-after-free vulnerability in the Linux kernel's ublk (userspace block device) subsystem affecting kernel versions up to 6.19-rc4. A race condition between asynchronous partition scanning and device teardown can cause kernel memory corruption when the partition scan worker dereferences a freed disk object. This vulnerability has a CVSS score of 7.8 (high) and could lead to denial of service or potential privilege escalation on affected systems.
IMMEDIATE ACTIONS:
1. Identify all systems running Linux kernel versions up to 6.19-rc4 using 'uname -r' command
2. Prioritize systems using ublk (userspace block devices) — check for ublk module: 'lsmod | grep ublk'
3. Implement kernel update schedule immediately
PATCHING GUIDANCE:
1. Update to Linux kernel 6.19-rc5 or later, or apply the official patch from kernel.org
2. For RHEL/CentOS systems: Apply security updates via 'yum update kernel' or 'dnf update kernel'
3. For Ubuntu systems: Run 'apt update && apt upgrade linux-image-generic'
4. For Debian systems: Apply kernel updates through standard package management
5. Schedule system reboot during maintenance window to activate patched kernel
COMPENSATING CONTROLS (if immediate patching not possible):
1. Disable ublk module if not required: 'echo 'blacklist ublk' >> /etc/modprobe.d/blacklist.conf'
2. Restrict access to /dev/ublk* devices using SELinux or AppArmor policies
3. Monitor system logs for kernel panics or oops messages: 'journalctl -p err'
4. Implement kernel module integrity checking using IMA/EVM
DETECTION RULES:
1. Monitor for kernel panic messages containing 'ublk_partition_scan_work' or 'use-after-free'
2. Track kernel module load/unload events for ublk: 'auditctl -w /sys/module/ublk -p wa'
3. Monitor system stability metrics for unexpected crashes in storage subsystem
4. Set up alerts for kernel oops in dmesg: 'grep -i "oops\|bug\|panic" /var/log/kern.log'
الإجراءات الفورية:
1. تحديد جميع الأنظمة التي تقوم بتشغيل إصدارات نواة لينكس حتى 6.19-rc4 باستخدام أمر 'uname -r'
2. إعطاء الأولوية للأنظمة التي تستخدم ublk (أجهزة الكتلة في مساحة المستخدم) — تحقق من وحدة ublk: 'lsmod | grep ublk'
3. تنفيذ جدول تحديث النواة على الفور
إرشادات التصحيح:
1. التحديث إلى نواة لينكس 6.19-rc5 أو أحدث، أو تطبيق الرقعة الرسمية من kernel.org
2. لأنظمة RHEL/CentOS: تطبيق تحديثات الأمان عبر 'yum update kernel' أو 'dnf update kernel'
3. لأنظمة Ubuntu: قم بتشغيل 'apt update && apt upgrade linux-image-generic'
4. لأنظمة Debian: تطبيق تحديثات النواة من خلال إدارة الحزم القياسية
5. جدولة إعادة تشغيل النظام خلال نافذة الصيانة لتفعيل النواة المصححة
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تعطيل وحدة ublk إذا لم تكن مطلوبة: 'echo 'blacklist ublk' >> /etc/modprobe.d/blacklist.conf'
2. تقييد الوصول إلى أجهزة /dev/ublk* باستخدام سياسات SELinux أو AppArmor
3. مراقبة سجلات النظام للأعطال أو رسائل الخطأ: 'journalctl -p err'
4. تنفيذ فحص سلامة وحدة النواة باستخدام IMA/EVM
قواعد الكشف:
1. مراقبة رسائل انهيار النواة التي تحتوي على 'ublk_partition_scan_work' أو 'use-after-free'
2. تتبع أحداث تحميل/تفريغ وحدة النواة لـ ublk: 'auditctl -w /sys/module/ublk -p wa'
3. مراقبة مقاييس استقرار النظام للأعطال غير المتوقعة في نظام التخزين الفرعي
4. إعداد تنبيهات لأعطال النواة في dmesg: 'grep -i "oops\|bug\|panic" /var/log/kern.log'