linux/drivers/net/wireless/realtek/rtlwifi/rtl8188ee
Jia-Ju Bai 6df3c293d2 rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA
In rtl88ee_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on
line 677:
  dma_addr_t mapping = dma_map_single(..., skb->data, ...);

On line 680, skb->data is assigned to hdr after cast:
  struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);

Then hdr->frame_control is accessed on line 681:
  __le16 fc = hdr->frame_control;

This DMA access may cause data inconsistency between CPU and hardwre.

To fix this bug, hdr->frame_control is accessed before the DMA mapping.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201119015127.12033-1-baijiaju1990@gmail.com
2020-11-24 17:06:34 +02:00
..
def.h rtlwifi: rtl8188ee: rtl8192ce: rtl8192de: rtl8723ae: rtl8821ae: Remove some unused bit manipulation macros 2019-09-13 17:55:40 +03:00
dm.c rtlwifi: rtl8188ee: Rename RT_TRACE to rtl_dbg 2020-08-31 18:25:47 +03:00
dm.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
fw.c rtlwifi: rtl8188ee: Rename RT_TRACE to rtl_dbg 2020-08-31 18:25:47 +03:00
fw.h rtlwifi: rtl8188ee: Remove usage of private bit manipulation 2019-12-18 20:22:27 +02:00
hw.c wireless: remove unneeded break 2020-11-07 13:34:22 +02:00
hw.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
led.c rtlwifi: rtl8188ee: Rename RT_TRACE to rtl_dbg 2020-08-31 18:25:47 +03:00
led.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
Makefile
phy.c rtlwifi: rtl8188ee: Remove set but unused variable 'reg_ea4' 2020-11-07 18:14:42 +02:00
phy.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
pwrseq.c rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
pwrseq.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
reg.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
rf.c rtlwifi: rtl8188ee: Rename RT_TRACE to rtl_dbg 2020-08-31 18:25:47 +03:00
rf.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
sw.c rtlwifi: rtl8188ee: use true,false for bool variables 2020-04-21 15:57:51 +03:00
table.c rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
table.h rtlwifi: rtl8188ee: Replace old-style license information 2019-02-19 16:59:50 +02:00
trx.c rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA 2020-11-24 17:06:34 +02:00
trx.h rtlwifi: rtl8188ee: Fix regression due to commit d1d1a96bdb 2020-03-12 15:31:39 +02:00