KernelScan.io

HIGH

i2c SMBUS OOB

CVE-2026-31627

CVSS 7.8 / 10.0 NVD

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

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: i2c: s3c24xx: check the size of the SMBUS message before using it The first byte of an i2c SMBUS message is the size, and it should be verified to ensure that it is in the range of 0..I2C_SMBUS_BLOCK_MAX before processing it. This is the same logic that was added in commit a6e04f05ce0b ("i2c: tegra: check msg length in SMBUS block read") to the i2c tegra driver.

02

Engine v0.2.0

Risk summary

Local attackers with low privileges can trigger an out-of-bounds write in the Samsung S3C24xx I2C driver during SMBUS block read operations. A malicious I2C slave can provide an invalid length byte (0 or greater than I2C_SMBUS_BLOCK_MAX), causing the driver to write beyond the bounds of the SMBUS data buffer. This leads to kernel stack memory corruption, potentially enabling privilege escalation, information disclosure, or system crashes on devices using this I2C controller.

Affecteddrivers/i2c/busses/i2c-s3c2410.c (I2C subsystem)

Vulnerability analysis

The vulnerability exists in the SMBUS block read emulation where the driver trusts the first byte received from the I2C bus as the message length without validation. When the I2C_M_RECV_LEN flag is set and the initial message length is 1, the driver adds the received byte to msg->len and continues reading bytes into msg->buf. If the received length exceeds I2C_SMBUS_BLOCK_MAX (32), subsequent bytes are written past the allocated buffer boundary. Because the buffer typically resides on the kernel stack (via union i2c_smbus_data in the SMBUS ioctl path), this constitutes a stack buffer overflow with attacker-controlled data and length. The fix adds bounds checking to reject length values of 0 or greater than I2C_SMBUS_BLOCK_MAX before extending the message length.

03

BranchFixed inPatch commit
5.105.10.258fd1650da24ed
5.155.15.2098f756a596439
6.16.1.1752d262da4bca6
6.126.12.83d87d5620125a
6.186.18.24377fae22a137
6.196.19.1471b3c316b22c
6.66.6.136fa00738ab30b
7.07.0.1aaaaec39ddbc
mainline7.1-rc1c0128c7157d6