]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: Fix for out-of bound access error
authorKarol Przybylski <karprzy7@gmail.com>
Tue, 5 Nov 2024 10:11:31 +0000 (11:11 +0100)
committerJeff Johnson <quic_jjohnson@quicinc.com>
Wed, 13 Nov 2024 00:44:55 +0000 (16:44 -0800)
commiteb8c0534713865d190856f10bfc97cf0b88475b1
tree3cd5c3bbc72d01ebf29fd1b133c8c7f456821aa6
parent1053987a6bce68127504cda476ee56b97c9109d9
wifi: ath12k: Fix for out-of bound access error

Selfgen stats are placed in a buffer using print_array_to_buf_index() function.
Array length parameter passed to the function is too big, resulting in possible
out-of bound memory error.
Decreasing buffer size by one fixes faulty upper bound of passed array.

Discovered in coverity scan, CID 1600742 and CID 1600758

Signed-off-by: Karol Przybylski <karprzy7@gmail.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241105101132.374372-1-karprzy7@gmail.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c