]> git.hungrycats.org Git - linux/commit
iio: adc: ad7923: Fix buffer overflow for tx_buf and ring_xfer
authorNuno Sa <nuno.sa@analog.com>
Tue, 29 Oct 2024 13:46:37 +0000 (13:46 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:41:10 +0000 (10:41 +0100)
commit218ecc35949129171ca39bcc0d407c8dc4cd0bbc
tree605ea0163bea9f25dea108f0496328eda9b5615a
parentee7a0a9daa8e918ef60cbd5c563794ad8b675ba8
iio: adc: ad7923: Fix buffer overflow for tx_buf and ring_xfer

commit 3a4187ec454e19903fd15f6e1825a4b84e59a4cd upstream.

The AD7923 was updated to support devices with 8 channels, but the size
of tx_buf and ring_xfer was not increased accordingly, leading to a
potential buffer overflow in ad7923_update_scan_mode().

Fixes: 851644a60d20 ("iio: adc: ad7923: Add support for the ad7908/ad7918/ad7928")
Cc: stable@vger.kernel.org
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Zicheng Qu <quzicheng@huawei.com>
Link: https://patch.msgid.link/20241029134637.2261336-1-quzicheng@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/ad7923.c