CVE-2026-64502 in Linuxinfo

Summary

by MITRE • 07/25/2026

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

iio: adc: ad_sigma_delta: fix clear_pending_event for registerless devices

ad_sigma_delta_clear_pending_event() falls through to the status register read path for devices with has_registers = false and no rdy_gpiod. For such devices, ad_sd_read_reg() skips the address byte entirely and clocks raw MISO bytes with no address phase — making it byte-for-byte identical to reading conversion data. If a pending conversion result is present, this partially consumes it and corrupts the data stream for the subsequent ad_sd_read_reg() call in ad_sigma_delta_single_conversion().

Furthermore, with num_resetclks = 0 on these devices, data_read_len evaluates to 0. If the clocked byte has bit 7 clear, pending_event is set and the code attempts memset(data + 2, 0xff, 0 - 1), overflowing to SIZE_MAX and corrupting the heap.

Fix by returning 0 immediately when neither rdy_gpiod nor has_registers is set. This is safe for all current registerless devices: ad7191 and ad7780 (with powerdown GPIO) are reset between conversions by CS deassertion, so there is no stale result to drain; ad7780 (without powerdown GPIO) and max11205 are continuously-converting and cycle ~DRDY at the output data rate regardless of whether the previous result was read, so the next falling edge fires naturally.

A future registerless device that holds ~DRDY asserted until data is read would be broken by this early return and would require either num_resetclks set or a rdy-gpio.

The same heap corruption is reachable on any device with rdy_gpiod set but num_resetclks = 0: if the GPIO indicates a pending event, the drain path executes memset(data + 2, 0xff, 0 - 1) regardless of has_registers. Add an explicit data_read_len == 0 guard after the pending event check; the stale result is then consumed by the first ad_sd_read_reg() call in ad_sigma_delta_single_conversion().

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 07/26/2026

The vulnerability resides within the linux kernel's industrial input/output subsystem specifically affecting the sigma-delta ADC driver implementation. This issue impacts devices that operate without traditional register interfaces, namely those with has_registers set to false. The core problem manifests in the ad_sigma_delta_clear_pending_event function where execution flow diverges into unexpected paths for registerless devices. When a device lacks both register support and ready gpio indication, the function transitions to a status register read path that bypasses normal address byte transmission.

The technical flaw stems from how ad_sd_read_reg() handles registerless devices by clocking raw MISO bytes without address phase synchronization. This creates a scenario where reading pending events consumes part of an ongoing conversion result, effectively corrupting the data stream for subsequent operations within ad_sigma_delta_single_conversion(). The corruption occurs because the function treats the partial data consumption as equivalent to reading actual conversion data, leading to misinterpretation of subsequent readings.

A more severe aspect involves heap memory corruption that occurs when num_resetclks equals zero on registerless devices. In such cases, data_read_len becomes zero, and when bit 7 of the clocked byte is clear, the code attempts to execute memset(data + 2, 0xff, 0 - 1) which results in an unsigned integer underflow. This overflow translates to a memory corruption operation targeting SIZE_MAX bytes, potentially compromising heap integrity and creating potential exploitation vectors for privilege escalation attacks.

The fix implements an immediate return of zero when neither rdy_gpiod nor has_registers is set, which maintains safety across existing registerless devices including ad7191 and ad7780. These devices properly handle conversion resets through chip select deassertion or continuous conversion cycles that naturally trigger data ready signals without requiring additional drain operations. The solution prevents the problematic code path while preserving correct functionality for all currently supported hardware configurations.

Additional protection measures address similar vulnerabilities affecting devices with rdy_gpiod but zero reset clocks. The fix introduces explicit guards against data_read_len equaling zero following pending event checks, ensuring that stale results are properly consumed through the first ad_sd_read_reg() call in the conversion sequence rather than attempting dangerous memory operations. This approach aligns with common security practices for preventing integer underflows and heap corruption in kernel space drivers.

This vulnerability relates to CWE-129, which covers insufficient validation of length parameters, and CWE-131, addressing incorrect calculation of buffer or pool sizes. The exploitation scenario could potentially map to ATT&CK technique T1068, which involves local privilege escalation through kernel vulnerabilities, though the specific vector would require additional conditions for successful exploitation. The fix represents a defensive programming approach that prevents undefined behavior in edge cases while maintaining backward compatibility with existing hardware implementations.

Responsible

Linux

Reservation

07/19/2026

Disclosure

07/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00206

KEV

no

Activities

low

Sources

Want to know what is going to be exploited?

We predict KEV entries!