CVE-2026-19575: Type confusion in the device_deinit system call allows user-mode threads to execute arbitrary kernel code

Published Oct 9, 2026
·
Updated

The user-mode verification handler for the devicedeinit() system call, zvrfydevicedeinit() in kernel/device.c, validated its dev argument with KSYSCALLOBJINIT(dev, KOBJANY). kobjectvalidate() short-circuits its type comparison when the requested type is KOBJANY, so the check reduced to "this pointer is the base address of some kernel object the calling thread has been granted" — the object's actual type was never compared, and KSYSCALLOBJINIT also skips the initialization-state check. The sibling handlers zvrfydeviceinit() and zvrfydeviceisready() already used KOBJDRIVERANY and were unaffected.

A thread running in user mode can therefore pass any kernel object it holds permission on — most usefully a thread stack object obtained from the kthreadstackalloc() syscall or a statically defined KTHREADSTACK it was granted in order to spawn a child user thread — whose backing memory is writable from user mode. zimpldevicedeinit() then interprets those attacker-written bytes as a struct device: it dereferences the state pointer read out of the object, calls the function pointer read out of ops.deinit, and on success writes through state again. The result is an indirect call to an arbitrary address executed in supervisor mode, plus an arbitrary kernel read and a single-byte kernel write.

Exploitation gives a local unprivileged thread full kernel code execution, defeating the CONFIGUSERSPACE isolation boundary entirely; a less precise attempt yields a supervisor-mode fault and a system crash. The defect is only reachable in builds that enable both CONFIGUSERSPACE and CONFIGDEVICEDEINITSUPPORT — with de-initialization support disabled, zimpldevicedeinit() returns -ENOTSUP without ever dereferencing the pointer. In v4.2.x and v4.3.x, CONFIGDEVICEDEINITSUPPORT defaulted to y, so every CONFIGUSERSPACE build of those releases is exposed unless the option was explicitly turned off. From v4.4.0 the option is opt-in (no default, and not selected by any in-tree subsystem), so a v4.4.x build is exposed only if it enables the option explicitly. The v4.2 line is no longer maintained and receives no backport.

The fix changes the object check to KOBJDRIVERANY, which constrains the argument to the build-generated driver object type range (KOBJDRIVERFIRST..KOBJDRIVERLAST) — the real struct device instances placed by the linker — so the state and ops.deinit fields are once again kernel-controlled.

Affected Software

1 affected component
Zephyr Project Zephyr>=4.2.0<=4.2.x, >=4.3.0<=4.3.x, >=4.4.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Disable CONFIG_DEVICE_DEINIT_SUPPORT to prevent the vulnerable device_deinit path from being reachable; this is required for exposed v4.2.x and v4.3.x builds unless the option was already explicitly turned off, and v4.4.x builds are exposed only when it is explicitly enabled.

    Zephyr device de-initialization support CONFIG_DEVICE_DEINIT_SUPPORT = n

Event History

Oct 9, 2026
CVE Published
via MITRE·07:16 AM
Data Sourced
via MITRE·07:16 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are realistically exposed?

Deployments that run user-mode threads and grant those threads access to kernel objects are exposed. The most useful object for exploitation is a user-writable thread stack obtained through k_thread_stack_alloc() or a statically defined K_THREAD_STACK granted to the thread for creating a child user thread.

2

What does an attacker need to exploit this issue?

An attacker needs code execution in a user-mode thread and permission to a kernel object whose backing memory they can write. They can supply that object to device_deinit() so it is interpreted as a device structure, allowing attacker-controlled fields to drive a kernel function-pointer call.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203