Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-102957

published high CVSS 3.1 · 7.7

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

Published
25 Nov 2026, 20:27:16 UTC
Updated
25 Nov 2026, 20:27:16 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
zephyrproject — zephyr2.5.0 to < 4.3.2 · 4.4.0 to < 4.5.0 · Other versions: unaffected Affected Not stated zephyr

Description

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 seriously, when the capture later completes, the driver ISR invokes z_pwm_capture_cycles_callback() with the dangling pointer. The callback writes into the expired kernel stack region and calls k_sem_give() on whatever memory now occupies it, which can corrupt live kernel stack frames and make the scheduler walk a forged wait queue. The result is kernel memory corruption from interrupt context, leading at least to a crash and possibly to privilege escalation out of the userspace sandbox. The fix rejects K_NO_WAIT with -EINVAL before any capture is configured.

en · zephyr · cna

Vendor advisories explicitly linked to this CVE.

0

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.7 / 10
Severity
high
Provider
zephyr · cna
Vector string
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
zephyrproject zephyr 2.5.0 to < 4.3.2 (affected · semver)4.4.0 to < 4.5.0 (affected · semver)Default: unaffected zephyr · cna

Weaknesses

1
  • CWE-825 memory-safety (zephyr · cna)

References

2
  • Fix commit https://github.com/zephyrproject-rtos/zephyr/commit/cad8ad3ed2511d2816a3e8ce63e8028f7c3a1a1e patch Contributors: zephyr (cna)
  • GHSA-gmqw-xpww-374m https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-gmqw-xpww-374m Contributors: zephyr (cna)

Provider assertions

1

zephyr · cna

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

Provenance

Schema
5.2
Searchable
yes
Content hash
a985d63aae51ef9e87d994aacb58721c970461d74f77e2eebcb425bd4621dfe7
Ingested
25 Nov 2026, 20:33:55 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected