CVE-2026-102957 - PWM capture syscall leaves callback armed on a dead kernel stack frame when called with K_NO_WAIT

Vulnerability · Reported by NVD · · CWE-825

Severity
High Risk score 77/100
CVSS
7.7 v3.1 · from NVD
Exploit chance (EPSS)
0.19% Higher than 5% of CVEs
Known exploited
No Not in CISA KEV

Summary

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 CONFIG_PWM_CAPTURE enabled, an unprivileged user-mode thread that has been granted access to a capture-capable PWM device can pass K_NO_WAIT to trigger the defect. Without userspace the function is only reachable from trusted application code. The uninitialized values come from the thread's privileged (kernel) stack, so a user-mode caller can read up to 8 bytes of stale kernel stack memory per call. More s

How this vulnerability can be exploited

An attacker can exploit this vulnerability with local access to the system, with a low-privileged account, and without any action from a user. Attack complexity is high, meaning specific conditions must exist first. If successful, the attacker could modify data or code and crash or disrupt the service. The impact can spread beyond the vulnerable component to other parts of the system.

Is it being exploited?

The EPSS model estimates a 0.19% chance this CVE will be exploited in the next 30 days, which is low and higher than 5% of all published CVEs.

Patch priority and what to do

Schedule patching in your next maintenance window, and sooner for internet-facing systems. 1) Check whether you run the affected product and version. 2) Apply the vendor update or patch listed in the advisory. 3) Review logs for signs of exploitation since the publication date.

CVSS vector

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H

See what each part means in the official CVSS calculator ↗

Tags

CVE-2026-102957, Linux

Sources & references

How this data is collected: methodology & sources.

Run this software? Get free alerts for new vulnerabilities →

Need to block attackers? Free hourly IOC blocklists (IPs, domains, URLs, hashes) →

Open the live threat dashboard →

Subscribe via RSS.