linux/drivers/net/wireless/realtek/rtlwifi/rtl8723ae
Jia-Ju Bai 8b2c13b2e5 rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA
In rtl8723e_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on
line 531:
  dma_addr_t mapping = dma_map_single(..., skb->data, ...);

On line 534, 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 535:
  __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/20201119015218.12220-1-baijiaju1990@gmail.com
2020-11-24 17:06:38 +02:00
..
btc.h
def.h
dm.c rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
dm.h
fw.c rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
fw.h
hal_bt_coexist.c rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
hal_bt_coexist.h
hal_btc.c rtlwifi: rtl8723ae: Delete a stray tab 2020-09-09 10:26:27 +03:00
hal_btc.h
hw.c wireless: remove unneeded break 2020-11-07 13:34:22 +02:00
hw.h
led.c rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
led.h
Makefile
phy.c rtlwifi: phy: Remove set but unused variable 'bbvalue' 2020-11-07 18:14:38 +02:00
phy.h
pwrseq.c
pwrseq.h
reg.h
rf.c rtlwifi: rtl8723ae: fix comparison pointer to bool warning in rf.c 2020-09-16 09:12:08 +03:00
rf.h
sw.c rtlwifi: rtl8723ae: use true,false for bool variables 2020-04-21 15:57:52 +03:00
table.c
table.h
trx.c rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA 2020-11-24 17:06:38 +02:00
trx.h