Description
In Zephyr's kernel pipe implementation, the userspace syscall verifier z_vrfy_k_pipe_init() in kernel/pipe.c used K_SYSCALL_OBJ() (which requires the kernel object to already be initialized) instead of K_SYSCALL_OBJ_NEVER_INIT() (which rejects an already-initialized object). As a result, on CONFIG_USERSPACE builds an unprivileged user thread that has been granted access to a k_pipe object can invoke the k_pipe_init syscall to re-initialize a pipe that is already in use.

z_impl_k_pipe_init() unconditionally resets the ring buffer, sets pipe->waiting to 0, and re-initializes both wait queues (z_waitq_init on pipe->data and pipe->space) without waking or accounting for threads currently blocked on the pipe. Any thread already pended in k_pipe_read()/k_pipe_write() is left orphaned: still marked pending with pended_on pointing at the cleared wait queue and with stale qnode_dlist links into the (now re-initialized) embedded list head.

When such an orphaned waiter is later timed out or woken, the scheduler calls sys_dlist_remove() on its stale node, writing through dangling prev/next pointers into kernel wait-queue/scheduler structures, causing list corruption (an attacker-driven invalid kernel write), lost wakeups, indefinitely blocked threads, and silent data loss. The flaw lets a deprivileged user thread corrupt the state of a kernel object shared with other threads/partitions.

The fix switches the verifier to K_SYSCALL_OBJ_NEVER_INIT(), matching the existing k_msgq_init verifier, so a user thread can no longer re-initialize a live pipe. The vulnerable code shipped in v4.1.0 and remained through v4.4.0.
Published: 2026-07-14
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In Zephyr kernel pipe implementation, the verification of the k_pipe_init syscall incorrectly permits re‑initialization of an already initialized pipe when CONFIG_USERSPACE is enabled. This allows an unprivileged user thread to reset the pipe’s ring buffer and re‑initialize its wait queues while other threads are blocked on the pipe. When those blocked threads are later awakened or timeout, the kernel attempts to remove their stale wait‑queue nodes, leading to an invalid kernel write, list corruption, lost wakeups, permanent deadlocks, and silent data loss. The flaw enables kernel state corruption that can cause a denial of service and data loss but does not provide direct arbitrary code execution.

Affected Systems

All Zephyr project builds compiled with CONFIG_USERSPACE enabled that use the k_pipe API are affected. The vulnerability existed in versions 4.1.0 through 4.4.0. Subsequent releases beyond 4.4.0 include a fix that changes the syscall verifier to reject re‑initialization of live pipes.

Risk and Exploitability

The CVSS score of 7.1 indicates high severity, whereas the EPSS score of <1% suggests that spontaneous exploitation is currently unlikely. The vulnerability is not catalogued in CISA KEV. An attacker must be able to run an unprivileged user thread on a CONFIG_USERSPACE system and invoke k_pipe_init while the pipe is in use. Once triggered, the resulting kernel corruption can lead to denial of service or data loss. While the attack path requires specific kernel configuration, the impact on an embedded system could be severe.

Generated by OpenCVE AI on July 31, 2026 at 10:19 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Zephyr 4.5 or later, which replaces the verifier with K_SYSCALL_OBJ_NEVER_INIT to block re‑initialization.
  • If an upgrade is not immediately possible, remove or disable the userspace k_pipe_init syscall from the configuration to eliminate the vulnerable code path.
  • Following any change, reboot the system to clear orphaned wait‑queue nodes and ensure the kernel state is clean.

Generated by OpenCVE AI on July 31, 2026 at 10:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 14 Jul 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Zephyrproject
Zephyrproject zephyr
Vendors & Products Zephyrproject
Zephyrproject zephyr

Tue, 14 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 15:15:00 +0000

Type Values Removed Values Added
Description In Zephyr's kernel pipe implementation, the userspace syscall verifier z_vrfy_k_pipe_init() in kernel/pipe.c used K_SYSCALL_OBJ() (which requires the kernel object to already be initialized) instead of K_SYSCALL_OBJ_NEVER_INIT() (which rejects an already-initialized object). As a result, on CONFIG_USERSPACE builds an unprivileged user thread that has been granted access to a k_pipe object can invoke the k_pipe_init syscall to re-initialize a pipe that is already in use. z_impl_k_pipe_init() unconditionally resets the ring buffer, sets pipe->waiting to 0, and re-initializes both wait queues (z_waitq_init on pipe->data and pipe->space) without waking or accounting for threads currently blocked on the pipe. Any thread already pended in k_pipe_read()/k_pipe_write() is left orphaned: still marked pending with pended_on pointing at the cleared wait queue and with stale qnode_dlist links into the (now re-initialized) embedded list head. When such an orphaned waiter is later timed out or woken, the scheduler calls sys_dlist_remove() on its stale node, writing through dangling prev/next pointers into kernel wait-queue/scheduler structures, causing list corruption (an attacker-driven invalid kernel write), lost wakeups, indefinitely blocked threads, and silent data loss. The flaw lets a deprivileged user thread corrupt the state of a kernel object shared with other threads/partitions. The fix switches the verifier to K_SYSCALL_OBJ_NEVER_INIT(), matching the existing k_msgq_init verifier, so a user thread can no longer re-initialize a live pipe. The vulnerable code shipped in v4.1.0 and remained through v4.4.0.
Title User thread can re-initialize an in-use `k_pipe`, corrupting kernel wait queues (`CONFIG_USERSPACE`)
Weaknesses CWE-825
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-07-14T18:38:46.782Z

Reserved: 2026-06-02T15:25:34.550Z

Link: CVE-2026-10671

cve-icon Vulnrichment

Updated: 2026-07-14T15:29:14.897Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T10:30:17Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference