Description
In Zephyr's userspace dynamic-objects subsystem, thread_idx_alloc() in kernel/userspace/userspace.c allocated a new thread permission index from the global _thread_idx_map[] bitmap without holding lists_lock.

On SMP systems, two user-mode threads invoking the k_object_alloc(K_OBJ_THREAD) syscall concurrently can both observe the same low free bit, perform the same non-atomic RMW to clear it, and return the identical tidx.

The two newly created K_OBJ_THREAD objects are then assigned the same thread_id, so the two user threads alias a single bit position in every kernel object's perms[] bitfield: any subsequent grant of access on a kernel object to one thread is implicitly a grant to the other, defeating userspace ACL isolation. A secondary lost-update window between the unlocked &=~BIT() in alloc and the locked |= BIT() in thread_idx_free() can also leak entries from the thread-index pool.

The defect is reachable from any user-mode thread via the unrestricted __syscall k_object_alloc and is gated on CONFIG_USERSPACE, CONFIG_DYNAMIC_OBJECTS, and CONFIG_SMP. The flaw was introduced when the per-thread permission index was added in 2018 and is present in every release up to and including v4.4.0. Fixed by holding lists_lock across the bitmap RMW and the permissions clear (and inlining the obj_list traversal that previously took the lock itself).
Published: 2026-07-25
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a race condition in Zephyr's userspace dynamic‑objects subsystem. Two user‑mode threads may concurrently allocate thread permission indices that collide, giving each thread the same thread_id and permission bit. Consequently, ACL enforcement in the kernel is broken, allowing one thread to grant device or object access to another. This flaw permits malicious users to bypass userspace ACL isolation and gain unauthorized access to kernel objects, effectively escalating privileges.

Affected Systems

Zephyr RTOS, versions up to and including v4.4.0, compiled with CONFIG_USERSPACE, CONFIG_DYNAMIC_OBJECTS, and CONFIG_SMP. The flaw resides in kernel/userspace/userspace.c's thread_idx_alloc function in the dynamic‑objects subsystem. All builds that include this code and allow concurrent k_object_alloc calls on SMP hardware are affected. The issue originates from the commit 862ea2fbbeb2ccdf8ff994b03e2e3b4405f2c37d and is documented in the GitHub advisory GHSA-j693‑5rh5‑8g8h.

Risk and Exploitability

The CVSS score of 6.5 indicates medium severity. The EPSS score is below 1%, implying a low likelihood of exploitation in the wild, and the vulnerability is not listed in CISA's KEV catalog. Based on the description, the attack is local because it requires user‑mode threads to call k_object_alloc concurrently. A multi‑core configuration with the relevant options enabled is required, but such a setup is typical for Zephyr deployments that use userspace and dynamic objects. If the race occurs, a malicious thread can impersonate another, granting itself privileged access to protected kernel objects and bypassing isolation. The secondary lost‑update window could also cause pool leaks, but this is secondary compared to the ACL compromise.

Generated by OpenCVE AI on August 3, 2026 at 18:18 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Zephyr to a release that includes the fix for the thread index race, such as v4.4.1 or later, or apply the patch from commit 862ea2fbbeb2ccdf8ff994b03e2e3b4405f2c37d.
  • If an immediate upgrade is not possible, disable the features that enable the race by compiling the kernel with CONFIG_USERSPACE, CONFIG_DYNAMIC_OBJECTS, or CONFIG_SMP turned off.
  • After the update or configuration change, test concurrent k_object_alloc calls to confirm that two threads no longer receive the same thread_id and that ACL enforcement remains intact.

Generated by OpenCVE AI on August 3, 2026 at 18:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 12 Aug 2026 15:00:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:*

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Sat, 25 Jul 2026 23:00:00 +0000

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

Sat, 25 Jul 2026 13:45:00 +0000

Type Values Removed Values Added
Description In Zephyr's userspace dynamic-objects subsystem, thread_idx_alloc() in kernel/userspace/userspace.c allocated a new thread permission index from the global _thread_idx_map[] bitmap without holding lists_lock. On SMP systems, two user-mode threads invoking the k_object_alloc(K_OBJ_THREAD) syscall concurrently can both observe the same low free bit, perform the same non-atomic RMW to clear it, and return the identical tidx. The two newly created K_OBJ_THREAD objects are then assigned the same thread_id, so the two user threads alias a single bit position in every kernel object's perms[] bitfield: any subsequent grant of access on a kernel object to one thread is implicitly a grant to the other, defeating userspace ACL isolation. A secondary lost-update window between the unlocked &=~BIT() in alloc and the locked |= BIT() in thread_idx_free() can also leak entries from the thread-index pool. The defect is reachable from any user-mode thread via the unrestricted __syscall k_object_alloc and is gated on CONFIG_USERSPACE, CONFIG_DYNAMIC_OBJECTS, and CONFIG_SMP. The flaw was introduced when the per-thread permission index was added in 2018 and is present in every release up to and including v4.4.0. Fixed by holding lists_lock across the bitmap RMW and the permissions clear (and inlining the obj_list traversal that previously took the lock itself).
Title SMP race in `thread_idx_alloc()` lets concurrent `k_object_alloc(K_OBJ_THREAD)` callers share a kernel-object permission slot
Weaknesses CWE-362
References
Metrics cvssV3_1

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


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-07-27T14:34:43.843Z

Reserved: 2026-06-02T15:26:11.951Z

Link: CVE-2026-10681

cve-icon Vulnrichment

Updated: 2026-07-27T14:34:40.525Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-25T14:16:28.957

Modified: 2026-08-12T14:48:55.350

Link: CVE-2026-10681

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T18:30:06Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')