Linux Kernel
CVE-2025-68265
Lifecycle Timeline
3DescriptionCVE.org
In the Linux kernel, the following vulnerability has been resolved:
nvme: fix admin request_queue lifetime
The namespaces can access the controller's admin request_queue, and stale references on the namespaces may exist after tearing down the controller. Ensure the admin request_queue is active by moving the controller's 'put' to after all controller references have been released to ensure no one is can access the request_queue. This fixes a reported use-after-free bug:
BUG: KASAN: slab-use-after-free in blk_queue_enter+0x41c/0x4a0 Read of size 8 at addr ffff88c0a53819f8 by task nvme/3287 CPU: 67 UID: 0 PID: 3287 Comm: nvme Tainted: G E 6.13.2-ga1582f1a031e #15 Tainted: [E]=UNSIGNED_MODULE Hardware name: Jabil /EGS 2S MB1, BIOS 1.00 06/18/2025 Call Trace: <TASK> dump_stack_lvl+0x4f/0x60 print_report+0xc4/0x620 ? _raw_spin_lock_irqsave+0x70/0xb0 ? _raw_read_unlock_irqrestore+0x30/0x30 ? blk_queue_enter+0x41c/0x4a0 kasan_report+0xab/0xe0 ? blk_queue_enter+0x41c/0x4a0 blk_queue_enter+0x41c/0x4a0 ? __irq_work_queue_local+0x75/0x1d0 ? blk_queue_start_drain+0x70/0x70 ? irq_work_queue+0x18/0x20 ? vprintk_emit.part.0+0x1cc/0x350 ? wake_up_klogd_work_func+0x60/0x60 blk_mq_alloc_request+0x2b7/0x6b0 ? __blk_mq_alloc_requests+0x1060/0x1060 ? __switch_to+0x5b7/0x1060 nvme_submit_user_cmd+0xa9/0x330 nvme_user_cmd.isra.0+0x240/0x3f0 ? force_sigsegv+0xe0/0xe0 ? nvme_user_cmd64+0x400/0x400 ? vfs_fileattr_set+0x9b0/0x9b0 ? cgroup_update_frozen_flag+0x24/0x1c0 ? cgroup_leave_frozen+0x204/0x330 ? nvme_ioctl+0x7c/0x2c0 blkdev_ioctl+0x1a8/0x4d0 ? blkdev_common_ioctl+0x1930/0x1930 ? fdget+0x54/0x380 __x64_sys_ioctl+0x129/0x190 do_syscall_64+0x5b/0x160 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7f765f703b0b Code: ff ff ff 85 c0 79 9b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d dd 52 0f 00 f7 d8 64 89 01 48 RSP: 002b:00007ffe2cefe808 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffe2cefe860 RCX: 00007f765f703b0b RDX: 00007ffe2cefe860 RSI: 00000000c0484e41 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 R10: 00007f765f611d50 R11: 0000000000000202 R12: 0000000000000003 R13: 00000000c0484e41 R14: 0000000000000001 R15: 00007ffe2cefea60 </TASK>
AnalysisAI
Use-after-free in Linux kernel NVMe subsystem allows local attackers to trigger memory corruption via stale admin request_queue references after controller teardown. The vulnerability affects the kernel's NVMe driver when namespaces retain references to a controller's admin request_queue that remains accessible after the controller has been partially torn down, enabling a local attacker with ioctl access to trigger a slab-use-after-free condition (KASAN detected in blk_queue_enter). EPSS score of 0.03% indicates minimal real-world exploitation probability despite the use-after-free nature, likely due to required local access and specific race condition timing.
Technical ContextAI
The Linux kernel NVMe driver manages NVMe device controllers and associated namespaces through a shared admin request_queue. The vulnerability resides in the controller lifecycle management where the admin request_queue lifetime is decoupled from namespace reference counting. When a controller is torn down, the controller's put operation (resource deallocation) occurred before all namespace references were fully released, leaving dangling pointers to the request_queue data structure. Subsequent namespace operations attempting to access the admin request_queue would read from freed slab memory, triggering KASAN detection at blk_queue_enter+0x41c. The root cause is a reference counting and resource ordering issue in the NVMe subsystem initialization and teardown paths, classified as a memory safety defect in kernel block layer management (related to CWE-416: Use After Free).
Affected ProductsAI
The Linux kernel is affected, with vulnerability present across multiple stable releases. Patched commits are available in the upstream kernel repository (git.kernel.org stable branch) at commit hashes 03b3bcd319b3ab5182bc9aaa0421351572c78ac0, a505f0ba36ab24176c300d7ff56aff85c2977e6c, e7dac681790556c131854b97551337aa8042215b, e8061d02b49c5c901980f58d91e96580e9a14acf, and ff037b5f47eeccc1636c03f84cd47db094eb73c9. Ubuntu-distributed kernels are referenced in USN-8094-4 security notice. The vulnerability is specific to systems with NVMe storage controllers, as the flaw is isolated to the kernel's NVMe subsystem (drivers/nvme) and does not affect non-NVMe storage configurations.
RemediationAI
Apply kernel updates incorporating the fixes referenced in the upstream commits: 03b3bcd319b3ab5182bc9aaa0421351572c78ac0, a505f0ba36ab24176c300d7ff56aff85c2977e6c, e7dac681790556c131854b97551337aa8042215b, e8061d02b49c5c901980f58d91e96580e9a14acf, or ff037b5f47eeccc1636c03f84cd47db094eb73c9. Ubuntu users should apply updates from USN-8094-4 (https://ubuntu.com/security/notices/USN-8094-4). The fix restructures the NVMe controller teardown sequence to defer the controller's put operation until after all namespace references have been fully released, ensuring the admin request_queue remains valid for in-flight namespace operations. Kernel versions incorporating these commits should be obtained from your distribution's stable release channels. Until patching is possible, avoid NVMe device hot-removal operations during active namespace access, though this is impractical as a long-term workaround.
More in Linux Kernel
View allLinux kernel contains a flaw known as 'Dirty Pipe' where improper pipe buffer flag initialization allows unprivileged lo
The overlayfs implementation in the linux (aka Linux kernel) package before 3.19.0-21.21 in Ubuntu through 15.04 does no
The packet_set_ring function in net/packet/af_packet.c in the Linux kernel through 4.10.6 does not properly validate cer
The check_alu_op function in kernel/bpf/verifier.c in the Linux kernel through 4.4 allows local users to cause a denial
Linux kernel: Exploitable memory corruption due to UFO to non-UFO path switch. Rated high severity (CVSS 7.0). Public ex
The ovl_setattr function in fs/overlayfs/inode.c in the Linux kernel through 4.3.3 attempts to merge distinct setattr op
The mem_write function in the Linux kernel before 3.2.2, when ASLR is disabled, does not properly check permissions when
The compat_sys_recvmmsg function in net/compat.c in the Linux kernel before 3.13.2, when CONFIG_X86_X32 is enabled, allo
Race condition in net/packet/af_packet.c in the Linux kernel through 4.8.12 allows local users to gain privileges or cau
The join_session_keyring function in security/keys/process_keys.c in the Linux kernel before 4.4.1 mishandles object ref
A remote code execution vulnerability in the Broadcom Wi-Fi firmware could enable a remote attacker to execute arbitrary
It was discovered that the cls_route filter implementation in the Linux kernel would not remove an old filter from the h
Same technique Use After Free
View allShare
External POC / Exploit Code
Leaving vuln.today