]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: rtlwifi: 8192cu: fix tid out of range in rtl92cu_tx_fill_desc()
authorMorning Star <alexbestoso@gmail.com>
Thu, 27 Nov 2025 08:37:08 +0000 (16:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:31 +0000 (10:14 +0100)
commit9765d6eb8298b07d499cdf9ef7c237d3540102d6
tree539db15213e0d4483f57c2e4b3f78cacb63f3aaa
parent1f8ae2e99a9df11a7951d972c119a2f0d3a41a6a
wifi: rtlwifi: 8192cu: fix tid out of range in rtl92cu_tx_fill_desc()

[ Upstream commit dd39edb445f07400e748da967a07d5dca5c5f96e ]

TID getting from ieee80211_get_tid() might be out of range of array size
of sta_entry->tids[], so check TID is less than MAX_TID_COUNT. Othwerwise,
UBSAN warn:

 UBSAN: array-index-out-of-bounds in drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:514:30
 index 10 is out of range for type 'rtl_tid_data [9]'

Fixes: 8ca4cdef9329 ("wifi: rtlwifi: rtl8192cu: Fix TX aggregation")
Signed-off-by: Morning Star <alexbestoso@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/1764232628-13625-1-git-send-email-pkshih@realtek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c