CVE-2026-138956: iio: adc: mcp3911: reject devices without match data
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: mcp3911: reject devices without match data
SPI driveroverride allows a device to bind to this driver without matching either the OF or SPI device ID table. In that case, spigetdevicematchdata() returns NULL.
mcp3911probe() stores the result and later calls through chip->config and accesses other chip-specific fields, causing a NULL pointer dereference.
Commit 572a00852635 ("iio: dac: ad5686: missing NULL check on match data") fixed the same driveroverride issue in another SPI driver. Reject devices without match data before continuing the probe.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the MCP3911 probe, reject devices without matching OF or SPI device ID data before continuing; do not proceed when spi_get_device_match_data() returns NULL.
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems using the Linux kernel MCP3911 SPI ADC driver are exposed when a device can be bound to that driver without matching its OF or SPI device ID table, such as through SPI driver_override.
What does an attacker or triggering condition require?
The triggering condition is binding an unmatched SPI device to the MCP3911 driver via driver_override. This causes spi_get_device_match_data() to return NULL and can lead to a NULL pointer dereference during probing.
How can I tell whether a system may be affected?
Check whether an SPI device has been forced to use the MCP3911 driver through driver_override despite not matching the driver's OF or SPI device ID table. Affected behavior occurs during driver probe when match data is absent.
What mitigation is available if updating is not immediately possible?
Do not use driver_override to bind devices that lack matching MCP3911 OF or SPI device IDs to the MCP3911 driver. Ensure only supported, matching devices are allowed to probe with this driver.