CVE-2026-105415
published high CVSS 3.1 · 7.0Out-of-bounds write via unchecked channel index in ESP32 MCPWM PWM driver set_cycles syscall
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| zephyrproject | — | zephyr4.4.0 to < 4.5.0 · Other versions: unaffected | Affected | Not stated | zephyr |
Description
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().
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.0 / 10
- Severity
- high
- Provider
- zephyr · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| zephyrproject | zephyr | 4.4.0 to < 4.5.0 (affected · semver)Default: unaffected | zephyr · cna |
Weaknesses
1- CWE-787 bounds
References
2- Fix commit https://github.com/zephyrproject-rtos/zephyr/commit/4e42cd021b1b41e4d80cf56839432adb8360fe88
- GHSA-wjc6-4j74-9wrh https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wjc6-4j74-9wrh
Provider assertions
1zephyr · cna
Out-of-bounds write via unchecked channel index in ESP32 MCPWM PWM driver set_cycles syscall
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 4a017b171553971d85186acb14c6e841eed82db824f040aee38b1c4cf66ce826
- Ingested
- 29 Nov 2026, 21:05:13 UTC
- Source record
- Official CVE record