z_impl_pwm_capture_cycles() in drivers/pwm/pwm_capture.c stores its capture context (struct z_pwm_capture_cb_data, including a struct k_sem) on its…
z_impl_pwm_capture_cycles() in drivers/pwm/pwm_capture.c stores its capture context (struct z_pwm_capture_cb_data, including a struct k_sem) on its own stack and registers a pointer to it as the driver capture callback's user_data. When called with a K_NO_WAIT timeout, k_sem_take() returns -EBUSY, which the function did not handle: it fell through, returned the uninitialized status field, copied uninitialized period/pulse values to the caller when that status happened to be zero, and returned without disabling the capture or clearing the callback. pwm_capture_cycles() is a system call, and z_vrfy_pwm_capture_cycles() passes the caller's timeout through unchanged. With CONFIG_USERSPACE and CO
Read at NIST National Vulnerability Database (CVE API 2.0)
- Vendor
- Zephyrproject
- Product
- zephyr
- CVSS v3.1
- 7.7 AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
- Weakness
- CWE-825
- NVD status
- Awaiting Analysis
Why it ranks 10 (Routine)
- CVSS v3.1 7.7 high
- Recency: items published within 24 hours gain 15, within 72 hours 6, within 7 days 2.