---
id: "CVE-2026-19947"
kind: "vulnerability"
aliases: ["CVE-2026-19947"]
title: "Zephyr: unprivileged user threads can switch devmux console routing"
severity: "medium"
cvss: 5.3
epss: 0.00097
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["devicetree", "embedded", "runtime", "userspace", "zephyr"]
not_affected_if: ["default-config", "no-devmux"]
published_at: "2026-10-21T19:17:02+00:00"
first_seen_at: "2026-10-23T21:57:29+00:00"
updated_at: "2026-10-25T04:20:46+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-19947", "first_seen_at": "2026-10-23T21:57:29+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-19947", "first_seen_at": "2026-10-24T13:15:54+00:00"}]
---

# Zephyr: unprivileged user threads can switch devmux console routing

The Zephyr devmux pseudo-driver's user-mode syscalls for reading and changing the selected downstream device skipped the kernel object permission check, so any user-mode thread could use them. An attacker can silence or redirect console, log and shell output, or change the selection under another thread that uses the multiplexer.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the build sets `CONFIG_USERSPACE=y` and the experimental `CONFIG_DEVMUX=y` in the project configuration.
- Look for a `zephyr,devmux` node in the devicetree sources.
- Check the Zephyr version in use against the fixed release, which the sources do not name: unknown.

## Fix

- Move Zephyr to a release that includes the devmux verifier fix (version unknown from the sources).
- Until patched, disable `CONFIG_DEVMUX` if the multiplexer is not needed.

## Timeline

- 2026-10-23T21:57:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-19947
- 2026-10-24T13:15:54+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-19947

## From the sources

The device multiplexer pseudo-driver in drivers/misc/devmux/devmux.c exposes two system calls, devmux_select_get() and devmux_select_set(). When CONFIG_USERSPACE is enabled, their user-mode verifiers z_vrfy_devmux_select_get() and z_vrfy_devmux_select_set() forwarded directly to the kernel implementations without performing any kernel-object validation — no k_object_access_check() and no driver object check. Compounding this, DEVICE_DT_INST_DEFINE() registered devmux instances with a NULL driver API pointer, which causes scripts/build/gen_kobject_list.py to skip them entirely, so a devmux device had no struct k_object and no permission on it could be granted or withheld in the first place.

Any thread running in user mode can reach the defect: device pointers such as DEVICE_DT_GET(DT_NODELABEL(devmux0)) are compile-time constants available to application code, and the syscall accepted them from a thread that had never been granted access to the device. The kernel implementations do validate the pointer against the static devmux instance table and bounds-check the selection index, so this is not a memory-safety issue; the failure is purely one of authorization. Exposure requires CONFIG_USERSPACE=y together with the experimental CONFIG_DEVMUX=y (which depends on CONFIG_DEVICE_MUTABLE) and a zephyr,devmux devicetree node.

An unprivileged user-mode thread can read and change which downstream device a multiplexer forwards to, bypassing the userspace object-permission model. Because a devmux forwards the data, configuration and API of the selected device — its documented use being zephyr,console and zephyr,shell-uart switching — an attacker can suppress console, log and shell output, redirect that output to a downstream device it is able to observe, or flip the selection underneath another thread that is legitimately using the multiplexer. The impact is bounded to the devicetree-fixed set of downstream devices; no out-of-bounds access or arbitrary pointer dereference is reachable.

The fix declares __subsystem struct devmux_driver_api and attaches a DEVICE_API(devmux, devmux_api) instance to each devmux device so that it becomes a tracked K_OBJ_DRIVER_DEVMUX kernel object, and adds K_OOPS(devmux_inst_get(dev) == SIZE_MAX) plus K_OOPS(k_object_access_check(dev) != 0) to both verifiers.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
