Out-of-bounds write via unchecked channel index in ESP32 MCPWM PWM driver set_cycles syscall
CVE-2026-105415Published 29 Nov 2026, 20:56 UTC
Real-world risk
1.9/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
7.0
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from zephyr)
The Espressif MCPWM PWM driver (drivers/pwm/pwm_mc_esp32.c) indexed its per-channel configuration array config->channel_config[] with the caller-supplied channel_idx in mcpwm_esp32_set_cycles() without any bounds check; the existing if (!channel) test can never fail. The driver then wrote channel->freq, channel->duty and channel->inverted through the out-of-bounds element and used out-of-bounds timer_id/operator_id/generator_id values to index MCPWM hardware registers. pwm_set_cycles() is a system call, and neither z_vrfy_pwm_set_cycles() nor z_impl_pwm_set_cycles() validates the channel. With CONFIG_USERSPACE enabled on an Espressif RISC-V SoC with PMP (ESP32-C6, and ESP32-C5 in later code), an unprivileged user-mode thread that has been granted access to the MCPWM device can pass an arbitrary channel number and cause the kernel-mode driver to write outside the array. The configuration object is a writable static in kernel RAM, so this gives a user thread a partially controlled kernel memory write (and stray peripheral register writes), which can crash the system and may be leveraged for privilege escalation. Builds without CONFIG_USERSPACE are not affected in a security sense, since only trusted code can call the driver. The fix adds a channel bounds check to mcpwm_esp32_set_cycles().
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| zephyrCommon | >= 4.4.0, < 4.5.0 | 4.5.0 |
What to do
Update to a fixed version: 4.5.0.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | LowA real low-privileged account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.45 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.2% chance of exploitation in 30 days (percentile 8), as of 2026-12-02.
The arithmetic
- Prerequisites multiplied together0.225
- Threat T1: Nothing known0.850
- 10 × impact 1 × prerequisites 0.225 × threat 0.851.912
- Rounded to one decimal between 0.1 and 101.9
Exploitation and evidence timeline
- 29 Nov 2026 Published
- 3 Dec 2026 Risk 1.9 (cvss fallback)
Weakness
CWE-787