Description
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.
Published: 2026-07-27
Score: 6.6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Zephyr’s log_filter_set syscall verifier performs a signed comparison on the src_id argument. When a negative value such as –1 passes the check, it is later converted to an unsigned 32‑bit index. The resulting value 0xFFFFFFFF indexes far beyond the dynamic log filter array, causing the kernel to read and write out of bounds. The write modifies a small 3‑bit log‑level field within a 32‑bit word, but the target address is attacker‑chosen and the modification occurs in supervisor mode, giving a kernel memory‑corruption and potential privilege‑escalation primitive.

Affected Systems

Any Zephyr project build from version 3.3.0 through 4.4.1 with CONFIG_USERSPACE=y and CONFIG_LOG_RUNTIME_FILTERING=y is affected. The issue originates in subsys/logging/log_mgmt.c and propagates to the kernel’s dynamic log filter array. The vulnerability is reachable from user space via the log_filter_set syscall.

Risk and Exploitability

The CVSS score of 6.6 reflects moderate severity, while the EPSS score of less than 1% indicates a low likelihood of exploitation. An attacker who can execute code on the device can invoke the vulnerable syscall from an unprivileged process, causing kernel memory corruption and potentially escalating privileges. The flaw is not listed in CISA KEV, but the direct user‑space trigger simplifies exploitation. The recommended remediation is to apply the vendor patch that changes the signed bound check to an unsigned comparison.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel patch that replaces the signed bound check with an unsigned comparison, addressing the out‑of‑bounds write flaw.
  • If upgrading is not feasible, reconfigure the build by disabling LOG_RUNTIME_FILTERING to eliminate the vulnerable syscall path.
  • As a temporary measure, manually patch subsys/logging/log_mgmt.c by replacing the signed comparison with (uint32_t)src_id < log_src_cnt_get(domain_id) before rebuilding the kernel.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 12 Aug 2026 14:45:00 +0000

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

Tue, 28 Jul 2026 01:30:00 +0000

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

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

Type Values Removed Values Added
Description 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.
Title Out-of-bounds write in Zephyr `log_filter_set` syscall verifier reachable from userspace
Weaknesses CWE-787
References
Metrics cvssV3_1

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

ssvc

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


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-07-27T19:00:21.365Z

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

Link: CVE-2026-10682

cve-icon Vulnrichment

Updated: 2026-07-27T19:00:16.894Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-27T19:17:14.070

Modified: 2026-08-12T14:27:28.290

Link: CVE-2026-10682

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T17:00:06Z

Weaknesses