Description
The STM32 SMBus driver (drivers/smbus/smbus_stm32.c) implements smbus_block_read() and smbus_block_pcall() by issuing a single i2c_transfer() in which the byte-count byte returned by the peripheral is read directly into the len field of the following i2c_msg. That message then receives data straight into the caller-supplied buffer. Nothing bounds the count, so smbus_stm32_block_read() and smbus_stm32_block_pcall() read up to 255 bytes into a buffer that the SMBus API documents (and the syscall verifiers validate) as holding at most SMBUS_BLOCK_BYTES_MAX (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 block_read 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 smbus_block_read/smbus_block_pcall 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 SMBUS_BLOCK_BYTES_MAX, returning -ENODATA otherwise.
Published: 2026-11-23
Score: 6.8 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 23 Nov 2026 18:30:00 +0000

Type Values Removed Values Added
Description The STM32 SMBus driver (drivers/smbus/smbus_stm32.c) implements smbus_block_read() and smbus_block_pcall() by issuing a single i2c_transfer() in which the byte-count byte returned by the peripheral is read directly into the len field of the following i2c_msg. That message then receives data straight into the caller-supplied buffer. Nothing bounds the count, so smbus_stm32_block_read() and smbus_stm32_block_pcall() read up to 255 bytes into a buffer that the SMBus API documents (and the syscall verifiers validate) as holding at most SMBUS_BLOCK_BYTES_MAX (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 block_read 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 smbus_block_read/smbus_block_pcall 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 SMBUS_BLOCK_BYTES_MAX, returning -ENODATA otherwise.
Title Out-of-bounds write from peripheral-supplied block count in STM32 SMBus driver
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-11-23T19:25:17.144Z

Reserved: 2026-09-29T20:25:20.540Z

Link: CVE-2026-102954

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-11-23T19:17:28.707

Modified: 2026-11-23T19:17:28.813

Link: CVE-2026-102954

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-23T19:30:17Z

Weaknesses