iio: pressure: bmp280: fix out-of-bounds access in sampling frequency lookup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 10b40ffba2f95cdeed47b731c5ad5ecc73e140e8 · < 56c423b233b214182c58c99861899327b45b0d6c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: pressure: bmp280: fix out-of-bounds access in sampling frequency lookup
The sampling frequency tables store each frequency as an integer part and a fractional part in micro units. num_sampling_freq_avail is initialized to the number of flattened integer elements because read_avail() returns the table as a flat array.
bmp280_write_sampling_frequency(), however, indexes the same table as a two-dimensional array and uses num_sampling_freq_avail as the number of rows. Convert the flattened element count back to the number of rows before iterating over the table.
From the CVE record · Linux
The Linux kernel bmp280 pressure sensor driver can read beyond a sampling frequency table because it treats the number of flattened elements as the number of rows. The input does not specify how an attacker could trigger this, or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels that include the bmp280 pressure sensor driver should check their versions; affected versions are not specified.