1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
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 rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +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: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
dm.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
fw.c rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
fw.h rtlwifi: rtl8723ae: Remove usage of private bit manipulation macros 2019-12-18 20:22:32 +02:00
hal_bt_coexist.c rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
hal_bt_coexist.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
hal_btc.c rtlwifi: rtl8723ae: Delete a stray tab 2020-09-09 10:26:27 +03:00
hal_btc.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
hw.c wireless: remove unneeded break 2020-11-07 13:34:22 +02:00
hw.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
led.c rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg 2020-08-31 18:26:03 +03:00
led.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy.c rtlwifi: phy: Remove set but unused variable 'bbvalue' 2020-11-07 18:14:38 +02:00
phy.h rtlwifi: rtl8723{be,ae}: Remove CamelCase variables 2019-02-19 17:03:05 +02:00
pwrseq.c rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
pwrseq.h rtlwifi: rtl8723{be,ae}: Remove CamelCase variables 2019-02-19 17:03:05 +02:00
reg.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
rf.c rtlwifi: rtl8723ae: fix comparison pointer to bool warning in rf.c 2020-09-16 09:12:08 +03:00
rf.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
sw.c rtlwifi: rtl8723ae: use true,false for bool variables 2020-04-21 15:57:52 +03:00
table.c rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
table.h rtlwifi: rtl8723ae: Replace old-style license information 2019-02-19 17:00:24 +02:00
trx.c rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA 2020-11-24 17:06:38 +02:00
trx.h rtlwifi: rtl8723ae: Convert inline routines to little-endian words 2019-09-13 17:55:35 +03:00