kernel_samsung_a53x/drivers/net/wireless/ath
Minsuk Kang 595302a9f7 wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus()
[ Upstream commit 2adc886244dff60f948497b59affb6c6ebb3c348 ]

Fix an array-index-out-of-bounds read in ath9k_htc_txstatus(). The bug
occurs when txs->cnt, data from a URB provided by a USB device, is
bigger than the size of the array txs->txstatus, which is
HTC_MAX_TX_STATUS. WARN_ON() already checks it, but there is no bug
handling code after the check. Make the function return if that is the
case.

Found by a modified version of syzkaller.

UBSAN: array-index-out-of-bounds in htc_drv_txrx.c
index 13 is out of range for type '__wmi_event_txstatus [12]'
Call Trace:
 ath9k_htc_txstatus
 ath9k_wmi_event_tasklet
 tasklet_action_common
 __do_softirq
 irq_exit_rxu
 sysvec_apic_timer_interrupt

Signed-off-by: Minsuk Kang <linuxlovemin@yonsei.ac.kr>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231113065756.1491991-1-linuxlovemin@yonsei.ac.kr
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:13:12 +01:00
..
ar5523 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ath5k Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ath6kl Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ath9k wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus() 2024-11-18 12:13:12 +01:00
ath10k wifi: ath10k: Don't touch the CE interrupt registers after power up 2024-11-18 11:43:12 +01:00
ath11k wifi: ath11k: Defer on rproc_get failure 2024-11-18 12:12:28 +01:00
carl9170 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wcn36xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wil6210 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ath.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dfs_pattern_detector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dfs_pattern_detector.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dfs_pri_detector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dfs_pri_detector.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
regd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
regd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
regd_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectral_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00