Description
In the Linux kernel, the following vulnerability has been resolved:

iio: accel: bmc150: clamp the device-reported FIFO frame count

__bmc150_accel_fifo_flush() copies the number of samples the device
reports in its hardware FIFO into an on-stack buffer

u16 buffer[BMC150_ACCEL_FIFO_LENGTH * 3];

which is sized for at most BMC150_ACCEL_FIFO_LENGTH (32) samples. The
frame count is read from the FIFO_STATUS register and only masked to its
7 valid bits:

count = val & 0x7F;

so it can be 0..127. The only other limit applied to it is the optional
caller-supplied sample budget:

if (samples && count > samples)
count = samples;

which does not constrain count on the flush-all path (samples == 0), and
leaves it well above 32 whenever samples is larger. count samples are
then transferred into buffer[]:

bmc150_accel_fifo_transfer(data, (u8 *)buffer, count);

bmc150_accel_fifo_transfer() reads count * 6 bytes through regmap, so a
malfunctioning, malicious or counterfeit accelerometer (or an attacker
tampering with the I2C/SPI bus) that reports up to 127 frames writes up
to 762 bytes into the 192-byte buffer: a stack out-of-bounds write of up
to 570 bytes that clobbers the stack canary, saved registers and the
return address.

Clamp count to BMC150_ACCEL_FIFO_LENGTH, the number of samples buffer[]
is sized for, before the transfer, mirroring the watermark clamp already
done in bmc150_accel_set_watermark(). A well-formed flush reports at most
BMC150_ACCEL_FIFO_LENGTH frames, so legitimate devices are unaffected.
Published: 2026-07-25
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The BMC150 accelerometer driver in the Linux kernel incorrectly trusts a device‑reported FIFO frame count that may exceed the buffer size. The count is only masked to 7 bits (0–127) and, on a flush‑all operation, is not limited by any caller‑supplied budget, allowing an attacker funneled through a malicious or tampered I2C/SPI bus to cause a stack out‑of‑bounds write of up to 570 bytes. This overflow can overwrite the stack canary, saved registers, and return address, providing a straightforward path to arbitrary code execution if the driver runs in privileged kernel context.

Affected Systems

All Linux kernel installations incorporating the BMC150 accelerometer driver are affected. The specific version range is not listed, but the vulnerability was present before the patch that clamps the frame count to the maximum buffer length of 32 samples. Users with newer kernels that include the fix are no longer vulnerable; however, any system still running an older kernel variant that has not applied this commit remains at risk.

Risk and Exploitability

The EPSS score indicates less than 1%, suggesting a low probability of real‑world exploitation at present, and the vulnerability is not listed in the CISA KEV catalog. Nonetheless, the high severity of the stack corruption means that an attacker who can influence the FIFO count—such as through a compromised I2C host or malicious firmware—could trigger the overflow. Successful exploitation would grant kernel‑level code execution, effectively enabling full system compromise.

Generated by OpenCVE AI on August 3, 2026 at 18:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a Linux kernel version that incorporates the bmc150_accel_fifo_flush fix that clamps the FIFO frame count to 32 samples.
  • If a kernel upgrade is not immediately possible, disable the BMC150 accelerometer driver or remove the device from the device tree so that the vulnerable code is never loaded.
  • Implement I2C bus monitoring or hardware filtering to reject anomalous FIFO count values and, if feasible, sandbox the driver to limit the impact of any buffer overflows.

Generated by OpenCVE AI on August 3, 2026 at 18:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4717-1 linux security update
Debian DLA Debian DLA DLA-4720-1 linux security update
Debian DLA Debian DLA DLA-4723-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
History

Thu, 30 Jul 2026 12:15:00 +0000


Thu, 30 Jul 2026 03:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-119

Sun, 26 Jul 2026 01:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-119

Sat, 25 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: iio: accel: bmc150: clamp the device-reported FIFO frame count __bmc150_accel_fifo_flush() copies the number of samples the device reports in its hardware FIFO into an on-stack buffer u16 buffer[BMC150_ACCEL_FIFO_LENGTH * 3]; which is sized for at most BMC150_ACCEL_FIFO_LENGTH (32) samples. The frame count is read from the FIFO_STATUS register and only masked to its 7 valid bits: count = val & 0x7F; so it can be 0..127. The only other limit applied to it is the optional caller-supplied sample budget: if (samples && count > samples) count = samples; which does not constrain count on the flush-all path (samples == 0), and leaves it well above 32 whenever samples is larger. count samples are then transferred into buffer[]: bmc150_accel_fifo_transfer(data, (u8 *)buffer, count); bmc150_accel_fifo_transfer() reads count * 6 bytes through regmap, so a malfunctioning, malicious or counterfeit accelerometer (or an attacker tampering with the I2C/SPI bus) that reports up to 127 frames writes up to 762 bytes into the 192-byte buffer: a stack out-of-bounds write of up to 570 bytes that clobbers the stack canary, saved registers and the return address. Clamp count to BMC150_ACCEL_FIFO_LENGTH, the number of samples buffer[] is sized for, before the transfer, mirroring the watermark clamp already done in bmc150_accel_set_watermark(). A well-formed flush reports at most BMC150_ACCEL_FIFO_LENGTH frames, so legitimate devices are unaffected.
Title iio: accel: bmc150: clamp the device-reported FIFO frame count
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-25T08:51:58.887Z

Reserved: 2026-07-19T15:36:31.793Z

Link: CVE-2026-64504

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-07-25T10:17:36.443

Modified: 2026-07-25T10:17:36.443

Link: CVE-2026-64504

cve-icon Redhat

Severity :

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64504 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T18:30:06Z

Weaknesses