CVE-2026-10682 in Zephyrinfo

Summary

by MITRE • 07/27/2026

The userspace verifier z_vrfy_log_filter_set() for the log_filter_set syscall in subsys/logging/log_mgmt.c performed a signed comparison against the int16_t src_id parameter: src_id < (int16_t)log_src_cnt_get(domain_id). Any negative value for src_id (e.g. -1) trivially satisfied this check and was forwarded into z_impl_log_filter_set, where it propagated to filter_set() and ultimately to get_dynamic_filter(), which uses source_id as an unsigned index into the linker-section array &TYPE_SECTION_START(log_dynamic)[source_id].filters.

After implicit conversion through uint32_t, an int16_t -1 becomes 0xFFFFFFFF, indexing log_dynamic far out of bounds and causing the kernel to perform an OOB read and an OOB read-modify-write (LOG_FILTER_SLOT_GET/SET) against memory adjacent to the log_dynamic section.

The written value is a constrained 3-bit log level slot within the targeted 32-bit word, but the target address is attacker-chosen (a small negative offset from log_dynamic) and the write occurs in supervisor mode following a syscall from an unprivileged user thread, providing a kernel memory-corruption / privilege-escalation primitive.

The defect is reachable on any build with CONFIG_USERSPACE=y and CONFIG_LOG_RUNTIME_FILTERING=y. Present from Zephyr v3.3.0 through v4.4.1. The fix replaces the signed bound check with an unsigned comparison: (uint32_t)src_id < log_src_cnt_get(domain_id), which correctly rejects negative inputs.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 07/27/2026

The vulnerability described represents a critical kernel memory corruption flaw in the Zephyr operating system's logging subsystem that enables privilege escalation through improper input validation. This issue manifests in the userspace verifier function z_vrfy_log_filter_set() located within subsys/logging/log_mgmt.c, where a fundamental type conversion error creates an exploitable condition. The flaw arises from a signed comparison operation that improperly handles negative integer values passed to the log_filter_set syscall, specifically comparing src_id against log_src_cnt_get(domain_id) using int16_t type semantics rather than proper unsigned validation.

The technical execution path begins with the vulnerable signed comparison where any negative value for src_id trivially satisfies the condition due to how signed integers behave in comparisons. When a negative value such as -1 is passed, it undergoes implicit conversion through uint32_t casting, transforming -1 into 0xFFFFFFFF, which then serves as an invalid array index into the linker-section array &TYPE_SECTION_START(log_dynamic)[source_id].filters. This conversion bypasses proper bounds checking and results in out-of-bounds memory access patterns that extend far beyond the legitimate array boundaries.

The operational impact of this vulnerability extends to kernel memory corruption through read-modify-write operations that occur during LOG_FILTER_SLOT_GET/SET operations against adjacent memory locations. The write operation targets a constrained 3-bit log level slot within a 32-bit word, but the address being written to is attacker-chosen and positioned at a small negative offset from the legitimate log_dynamic section. This presents a complete kernel memory corruption primitive that operates in supervisor mode following an unprivileged user thread syscall, effectively creating a privilege escalation vector.

This vulnerability directly maps to CWE-129 and CWE-787 within the Common Weakness Enumeration framework, representing improper input validation and out-of-bounds read/write conditions respectively. The attack pattern aligns with ATT&CK technique T1068 (Exploitation for Privilege Escalation) and T1543.003 (Create or Modify System Process - Windows Service). The flaw exists across multiple Zephyr versions from v3.3.0 through v4.4.1, making it a persistent threat in systems utilizing userspace and runtime logging features.

The mitigation strategy implemented in the fix addresses the root cause by replacing the signed comparison with an unsigned comparison using (uint32_t)src_id < log_src_cnt_get(domain_id). This ensures that negative inputs are properly rejected before any potentially dangerous memory operations can occur. The solution prevents the implicit type conversion that led to the out-of-bounds access while maintaining all legitimate functionality for valid positive source ID values, effectively closing the privilege escalation vector while preserving system stability and security posture.

Responsible

Zephyr

Reservation

06/02/2026

Disclosure

07/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00101

KEV

no

Activities

low

Sources

Do you need the next level of professionalism?

Upgrade your account now!