# CVE-2026-105415: Out-of-bounds write via unchecked channel index in ESP32 MCPWM PWM driver set\_cycles syscall

- Priority: **Routine**
- Reason: Not severe (CVSS 7, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-29 · Modified: 2026-12-03
- Record: https://cvemate.com/vulnerability/CVE-2026-105415 · JSON: https://cvemate.com/vulnerability/CVE-2026-105415/json

## Description

```text
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().
```

## Signals

- CVSS: 7 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.178%, percentile 7.68%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- zephyrproject zephyr: ≥ 4.4.0, \< 4.5.0

## References

- <https://github.com/zephyrproject-rtos/zephyr/commit/4e42cd021b1b41e4d80cf56839432adb8360fe88>
- <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wjc6-4j74-9wrh>

---

Data as of 2026-12-05T08:03:53.493Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
