1. 20 Oct, 2021 3 commits
    • Zheyu Ma's avatar
      mwl8k: Fix use-after-free in mwl8k_fw_state_machine() · 257051a2
      Zheyu Ma authored
      When the driver fails to request the firmware, it calls its error
      handler. In the error handler, the driver detaches device from driver
      first before releasing the firmware, which can cause a use-after-free bug.
      
      Fix this by releasing firmware first.
      
      The following log reveals it:
      
      [    9.007301 ] BUG: KASAN: use-after-free in mwl8k_fw_state_machine+0x320/0xba0
      [    9.010143 ] Workqueue: events request_firmware_work_func
      [    9.010830 ] Call Trace:
      [    9.010830 ]  dump_stack_lvl+0xa8/0xd1
      [    9.010830 ]  print_address_description+0x87/0x3b0
      [    9.010830 ]  kasan_report+0x172/0x1c0
      [    9.010830 ]  ? mutex_unlock+0xd/0x10
      [    9.010830 ]  ? mwl8k_fw_state_machine+0x320/0xba0
      [    9.010830 ]  ? mwl8k_fw_state_machine+0x320/0xba0
      [    9.010830 ]  __asan_report_load8_noabort+0x14/0x20
      [    9.010830 ]  mwl8k_fw_state_machine+0x320/0xba0
      [    9.010830 ]  ? mwl8k_load_firmware+0x5f0/0x5f0
      [    9.010830 ]  request_firmware_work_func+0x172/0x250
      [    9.010830 ]  ? read_lock_is_recursive+0x20/0x20
      [    9.010830 ]  ? process_one_work+0x7a1/0x1100
      [    9.010830 ]  ? request_firmware_nowait+0x460/0x460
      [    9.010830 ]  ? __this_cpu_preempt_check+0x13/0x20
      [    9.010830 ]  process_one_work+0x9bb/0x1100
      Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/1634356979-6211-1-git-send-email-zheyuma97@gmail.com
      257051a2
    • Ziyang Xuan's avatar
      rsi: stop thread firstly in rsi_91x_init() error handling · 515e7184
      Ziyang Xuan authored
      When fail to init coex module, free 'common' and 'adapter' directly, but
      common->tx_thread which will access 'common' and 'adapter' is running at
      the same time. That will trigger the UAF bug.
      
      ==================================================================
      BUG: KASAN: use-after-free in rsi_tx_scheduler_thread+0x50f/0x520 [rsi_91x]
      Read of size 8 at addr ffff8880076dc000 by task Tx-Thread/124777
      CPU: 0 PID: 124777 Comm: Tx-Thread Not tainted 5.15.0-rc5+ #19
      Call Trace:
       dump_stack_lvl+0xe2/0x152
       print_address_description.constprop.0+0x21/0x140
       ? rsi_tx_scheduler_thread+0x50f/0x520
       kasan_report.cold+0x7f/0x11b
       ? rsi_tx_scheduler_thread+0x50f/0x520
       rsi_tx_scheduler_thread+0x50f/0x520
      ...
      
      Freed by task 111873:
       kasan_save_stack+0x1b/0x40
       kasan_set_track+0x1c/0x30
       kasan_set_free_info+0x20/0x30
       __kasan_slab_free+0x109/0x140
       kfree+0x117/0x4c0
       rsi_91x_init+0x741/0x8a0 [rsi_91x]
       rsi_probe+0x9f/0x1750 [rsi_usb]
      
      Stop thread before free 'common' and 'adapter' to fix it.
      
      Fixes: 2108df3c ("rsi: add coex support")
      Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20211015040335.1021546-1-william.xuanziyang@huawei.com
      515e7184
    • Ryder Lee's avatar
      MAINTAINERS: mt76: update MTK folks · 026e092c
      Ryder Lee authored
      Add more MTK folks to actively maintain the wireless chipsets across
      segments. The work is becoming increasingly complicated and various
      and we can provides hardware related perspectives to offload
      Felix's workload, especially for the 11ax and upcoming 11be devices
      Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Acked-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/eb888ae0e43a980c2c1aaed372a9b5e8098ea4ef.1634107511.git.ryder.lee@mediatek.com
      026e092c
  2. 18 Oct, 2021 5 commits
  3. 13 Oct, 2021 4 commits
  4. 11 Oct, 2021 2 commits
  5. 10 Oct, 2021 22 commits
  6. 09 Oct, 2021 4 commits