CVE-2026-93466: Integer wraparound in bbram_read and bbram_write syscalls allows user threads to read and overwrite kernel memory below the BBRAM region

Published Dec 6, 2026
·
Updated

The BBRAM system call verifiers zvrfybbramread() and zvrfybbramwrite() in drivers/bbram/bbramhandlers.c validated the device object and the user buffer but never validated the caller-supplied offset and size. Range checking was left to the individual BBRAM drivers (bbramemul, bbramit8xxx2, bbramnpcx, bbramrts5912, bbramstm32, bbramxec), which all use the check offset + size > capacity. That sum wraps for large offset values: with offset = SIZEMAX - k + 1 and size = k + j (j no larger than the capacity), the sum wraps to j, the check passes, and the driver accesses base + offset, which wraps to k bytes below the BBRAM region.

A user-mode thread that has been granted access to a BBRAM device object chooses both values, so k is bounded only by the size of the user buffer it supplies. Through bbramread() the kernel copies that much memory from below the BBRAM window into the user buffer; through bbramwrite() it copies attacker-controlled bytes over it. On the emulated driver that memory is kernel RAM: the reporter's proof of concept on qemux86 reads and overwrites a byte of an adjacent kernel MMIO pointer, and the kernel faults on its next use. On hardware it is the peripheral register space below the BBRAM window (on bbramstm32, reached through a backup-register index that wraps below the register base). A user thread can therefore disclose and corrupt supervisor-only memory, and an access to an unmapped or side-effecting address in supervisor mode can raise a fatal fault.

The bbram syscalls are only present in the image when CONFIGUSERSPACE is enabled and bbram.h is emitted as a syscall header: in released versions this requires CONFIGEMITALLSYSCALLS=y or an application-level zephyrsyscallheader() registration (without it a userspace build with BBRAM does not compile). In development builds after the header was registered by default, it applies to any CONFIGUSERSPACE build with a BBRAM driver.

The fix adds an overflow-safe range check against the device capacity (offset > capacity - size) in both syscall handlers before the driver is invoked: 8438d3b9c1a9 for the read path and c3ea409fc4a0 for the write path.

Affected Software

1 affected component
Zephyr Project Zephyr

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 8438d3b9c1a9
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch c3ea409fc4a0

Event History

Dec 6, 2026
CVE Published
via MITRE·03:16 PM
Data Sourced
via MITRE·03:16 PM
DescriptionSeverityWeakness

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203