iio: adc: mt6359: fix unchecked return value in mt6358_read_imp
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: mt6359: fix unchecked return value in mt6358_read_imp
In mt6358_read_imp(), the variable val_v is passed to regmap_read() but the return value is not checked. If the read fails, val_v remains uninitialized and its random stack content is subsequently reported as a measurement result.
Initialize val_v to zero to ensure a predictable value is reported in case of bus failure and to prevent potential stack data leakage. This also satisfies static analyzers that might otherwise flag the variable as used uninitialized.
From the CVE record · Linux
The Linux kernel’s mt6359 ADC driver does not check whether a register read succeeds in mt6358_read_imp(). If the bus read fails, it may report uninitialized stack content as a measurement, potentially leaking stack data. The input does not establish an attacker access path, authentication requirement, or user interaction requirement.
Engineers running Linux kernels that include the affected mt6359 ADC driver should check their kernel builds; affected versions were not specified.