summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorZekun Shen <bruceshenzk@gmail.com>2020-06-23 18:11:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-30 10:38:32 +0100
commitf34426b44d24f4624e49dc122526f603afc85973 (patch)
tree0e846f901b118a71d13c035913b6834b2acee1c1 /firmware
parent30255785272f896d1f275f095eb0b2089426b153 (diff)
downloadlinux-stable-f34426b44d24f4624e49dc122526f603afc85973.tar.gz
linux-stable-f34426b44d24f4624e49dc122526f603afc85973.tar.bz2
linux-stable-f34426b44d24f4624e49dc122526f603afc85973.zip
ath10k: check idx validity in __ath10k_htt_rx_ring_fill_n()
[ Upstream commit bad60b8d1a7194df38fd7fe4b22f3f4dcf775099 ] The idx in __ath10k_htt_rx_ring_fill_n function lives in consistent dma region writable by the device. Malfunctional or malicious device could manipulate such idx to have a OOB write. Either by htt->rx_ring.netbufs_ring[idx] = skb; or by ath10k_htt_set_paddrs_ring(htt, paddr, idx); The idx can also be negative as it's signed, giving a large memory space to write to. It's possibly exploitable by corruptting a legit pointer with a skb pointer. And then fill skb with payload as rougue object. Part of the log here. Sometimes it appears as UAF when writing to a freed memory by chance. [ 15.594376] BUG: unable to handle page fault for address: ffff887f5c1804f0 [ 15.595483] #PF: supervisor write access in kernel mode [ 15.596250] #PF: error_code(0x0002) - not-present page [ 15.597013] PGD 0 P4D 0 [ 15.597395] Oops: 0002 [#1] SMP KASAN PTI [ 15.597967] CPU: 0 PID: 82 Comm: kworker/u2:2 Not tainted 5.6.0 #69 [ 15.598843] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 15.600438] Workqueue: ath10k_wq ath10k_core_register_work [ath10k_core] [ 15.601389] RIP: 0010:__ath10k_htt_rx_ring_fill_n (linux/drivers/net/wireless/ath/ath10k/htt_rx.c:173) ath10k_core Signed-off-by: Zekun Shen <bruceshenzk@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200623221105.3486-1-bruceshenzk@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions