title: wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus()
description: In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus()
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
affected:
{
product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 1da177e4c3f4, lessThan: f44f073c7811, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: f11f0fd1ad6c, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 84770a996ad8, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 9003fa9a0198, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 25c6f49ef59b, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: e4f4bac7d3b6, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: be609c7002dd, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 2adc886244df, status: affected, versionType: git
}
{
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 4.19.307, lessThanOrEqual: 4.19.*, status: unaffected, versionType: custom
version: 5.4.269, lessThanOrEqual: 5.4.*, status: unaffected, versionType: custom
version: 5.10.210, lessThanOrEqual: 5.10.*, status: unaffected, versionType: custom
version: 5.15.149, lessThanOrEqual: 5.15.*, status: unaffected, versionType: custom
version: 6.1.77, lessThanOrEqual: 6.1.*, status: unaffected, versionType: custom
version: 6.6.16, lessThanOrEqual: 6.6.*, status: unaffected, versionType: custom
version: 6.7.4, lessThanOrEqual: 6.7.*, status: unaffected, versionType: custom
version: 6.8, lessThanOrEqual: *, status: unaffected, versionType: original_commit_for_fix
}
