Sceawere
Vulnerability Detail
CVE-2026-11742UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
Zephyr Kernel Queue Use-After-Free
Vulnerability Metadata
- Severity
- Low
- Score / CVSS
- 3.6
- Creation Date
- 15h ago
- Vendor
- zephyrproject
- Product
- zephyr
- Attack Type
- use-after-free
- Vector String
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:L
- Attack Complexity
- HIGH
Narrative and Response
Description
The kernel queue helper z_queue_node_peek() in kernel/queue.c dereferences a node taken from a queue's data_q list, reading the node's flag byte and, for items enqueued via k_queue_alloc_append/alloc_prepend, the data pointer of an internally allocated alloc_node struct. The implementations of z_impl_k_queue_peek_head() and z_impl_k_queue_peek_tail() performed this read-and-dereference without holding the queue's spinlock, while every other accessor of the same list — including k_queue_get(), which unlinks a node and k_free()s its backing alloc_node — operates under that lock. Because peek was unsynchronized, a concurrent k_queue_get() on the same queue (on an SMP build, or under preemption/ISR concurrency) can free the node between the moment peek obtains the node pointer and the moment it dereferences it. The peek then reads flag bits and a data pointer out of freed, potentially re-allocated heap memory and returns a stale or dangling pointer to its caller. k_fifo and k_lifo are thin wrappers over k_queue, so this affects buffer queues used throughout the net_buf, Bluetooth, USB, and networking subsystems; the peek operations are also system calls reachable from CONFIG_USERSPACE threads. The consequences are a use-after-free read that can leak stale heap contents (one pointer word) and, when the returned dangling pointer is subsequently consumed as a live buffer, a dereference that can crash the system or corrupt memory. Exploitation requires winning a small race window with local access (e.g. a userspace process racing k_queue_peek_* against k_queue_get on a shared queue, or two CPUs), so practical impact is bounded and of low severity. The fix wraps both peek implementations with k_spin_lock/k_spin_unlock on the queue lock, making the read-and-dereference atomic with respect to the concurrent unlink-and-free and bringing peek into line with the rest of the queue's locking discipline.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "3.6",
"pubDate": "2026-08-07T22:16:57.180Z",
"pubdate": "2026-08-07T22:16:57.180Z",
"executiveSummary": "A use-after-free vulnerability exists in the kernel queue helper z_queue_node_peek() within Zephyr, specifically affecting the z_impl_k_queue_peek_head() and z_impl_k_queue_peek_tail() implementations. This flaw arises due to a lack of proper synchronization when accessing the queue's data_q list.\nThe vulnerability allows a local attacker with access to userspace threads or system calls to exploit a race condition between a peek operation and a concurrent k_queue_get() operation on the same queue. If successfully exploited, the vulnerability results in a use-after-free read condition, which can leak stale heap memory contents or lead to memory corruption and system crashes when the returned dangling pointer is subsequently dereferenced.\nBecause k_fifo and k_lifo act as wrappers over k_queue, the issue impacts buffer queues utilized across core networking, Bluetooth, USB, and net_buf subsystems. Exploitation requires winning a small race window under SMP builds or preemption/ISR concurrency, meaning practical impact is bounded and evaluated as low severity.",
"technicalDetails": "The root cause of the vulnerability lies in unsynchronized memory access within the kernel queue helper z_queue_node_peek() located in kernel/queue.c. Specifically, z_impl_k_queue_peek_head() and z_impl_k_queue_peek_tail() read and dereference a node taken from a queue's data_q list without acquiring the queue's spinlock. Every other list accessor—including k_queue_get(), which unlinks a node and invokes k_free() on its backing alloc_node—correctly operates under this lock.\nThe attack flow proceeds as follows: First, a thread initiates a peek operation via z_impl_k_queue_peek_head() or z_impl_k_queue_peek_tail(), obtaining a pointer to a node within the queue's data_q list. Before the peek operation can read the node's flag byte and data pointer (for items enqueued via k_queue_alloc_append or k_queue_alloc_prepend), a concurrent k_queue_get() operation executes on the same queue under SMP, preemption, or ISR concurrency. This concurrent operation unlinks the node and frees its backing alloc_node via k_free().\nSubsequently, the unsynchronized peek operation reads flag bits and a data pointer from the freed and potentially re-allocated heap memory. It then returns a stale or dangling pointer to the caller. When the caller attempts to consume this returned dangling pointer as a live buffer, the resulting dereference can crash the system or corrupt memory. Additionally, the vulnerability can leak a single pointer word of stale heap contents.\nThe vulnerable components include the z_queue_node_peek() function and the unsynchronized z_impl_k_queue_peek_head() and z_impl_k_queue_peek_tail() implementations in kernel/queue.c. These operations are exposed as system calls reachable from CONFIG_USERSPACE threads. Exploitation requires local access and the ability to win a narrow race window against concurrent queue removal operations, such as k_queue_get."
}