CVE-2026-102954: Out-of-bounds write from peripheral-supplied block count in STM32 SMBus driver

Published Nov 23, 2026
·
Updated

The STM32 SMBus driver (drivers/smbus/smbusstm32.c) implements smbusblockread() and smbusblockpcall() by issuing a single i2ctransfer() in which the byte-count byte returned by the peripheral is read directly into the len field of the following i2cmsg. That message then receives data straight into the caller-supplied buffer. Nothing bounds the count, so smbusstm32blockread() and smbusstm32blockpcall() read up to 255 bytes into a buffer that the SMBus API documents (and the syscall verifiers validate) as holding at most SMBUSBLOCKBYTESMAX (32) bytes.

The count is chosen by the addressed SMBus peripheral. A malicious, counterfeit or faulty device on the bus (for example a removable smart battery, PMBus supply or plug-in module), or anyone able to drive the bus lines, can report a block count above 32 and cause the driver to write up to 223 bytes past the end of the caller's buffer. Callers typically pass a 32-byte stack buffer, as the in-tree smbus blockread shell command does, so the overflow lands on the caller's stack before any caller-side count check can run.

The result is attacker-controlled stack or memory corruption in the context of the calling thread, which can crash the system or potentially be leveraged for code execution. When the call arrives through the smbusblockread/smbusblockpcall system calls, the out-of-bounds write happens in supervisor mode beyond the 32-byte region validated for the user thread. The fix receives the block into a driver-local 255-byte buffer and copies it out only when the count is at most SMBUSBLOCKBYTESMAX, returning -ENODATA otherwise.

Affected Software

1 affected component
Zephyr Project Zephyr

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In drivers/smbus/smbus_stm32.c, update smbus_block_read() and smbus_block_pcall() to receive the block into a driver-local 255-byte buffer; copy it to the caller’s buffer only when the reported count is at most SMBUS_BLOCK_BYTES_MAX (32), and otherwise return -ENODATA.

Event History

Nov 23, 2026
CVE Published
via MITRE·06:02 PM
Data Sourced
via MITRE·06:02 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are realistically exposed?

Systems using the STM32 SMBus driver and invoking its SMBus block-read or block-process-call paths are exposed when an addressed device on the bus is malicious, counterfeit, or faulty. Examples include removable smart batteries, PMBus supplies, and plug-in modules.

2

What access does an attacker need to trigger the issue?

The attacker must be able to control the SMBus peripheral's reported block count or drive the bus lines. The issue does not require privileges or user interaction, but it depends on physical or equivalent access to the bus.

3

What is corrupted when exploitation succeeds?

The peripheral can cause up to 223 bytes to be written past the caller's buffer. Typical callers use a 32-byte stack buffer, so the overwrite can corrupt stack or memory in the context of the calling thread before caller-side count validation occurs.

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