The Espressif MCPWM PWM driver (drivers/pwm/pwm_mc_esp32.c) indexed its per-channel configuration array config->channel_config[] with the…
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)
Read at NIST National Vulnerability Database (CVE API 2.0)
- Vendor
- Zephyrproject
- Product
- zephyr
- CVSS v3.1
- 7.0 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weakness
- CWE-787
- NVD status
- Awaiting Analysis
Why it ranks 12 (Routine)
- CVSS v3.1 7.0 high
- Recency: items published within 24 hours gain 15, within 72 hours 6, within 7 days 2.