iio: imu: st_lsm6dsx: fix stack leak in tagged FIFO buffer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 · < e6bb3a49c5f9de870ea95e69775df785728e3366| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: imu: st_lsm6dsx: fix stack leak in tagged FIFO buffer
The tagged FIFO path declares iio_buff on the stack with __aligned(8) but no initializer, but there is a hole in the structure, which will then leak to userspace as ST_LSM6DSX_SAMPLE_SIZE bytes (6) will be copied, but the space between that and the timestamp are not initialized.
Commit c14edb4d0bdc ("iio:imu:st_lsm6dsx Fix alignment and data leak issues") moved the untagged FIFO path to a kzalloc'd buffer in hw->scan, but for the tagged path it only added the alignment qualifier and not the initializer :(
Fix this by just zero-initializing the structure on the stack.
From the CVE record · Linux
The Linux kernel’s st_lsm6dsx tagged FIFO path can copy uninitialized stack data to userspace. A local user who can access this path may receive that data; the input does not specify authentication requirements.
Engineers running Linux kernels with the st_lsm6dsx driver should check their versions; affected versions are not specified.