rtw88: fix use after free in rtw_hw_scan_update_probe_req()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 3 Feb 2022 08:25:32 +0000 (11:25 +0300)
committerKalle Valo <kvalo@kernel.org>
Thu, 10 Feb 2022 08:32:25 +0000 (10:32 +0200)
commita954f29aea5d2cf58feedf83235edf3367229a37
tree792c10a63f92cedb8cafdf3ea4bbf056e92c7cd5
parentc761161851d31a6dc5274699cdf4e01de558cba9
rtw88: fix use after free in rtw_hw_scan_update_probe_req()

This code needs to use skb_queue_walk_safe() instead of skb_queue_walk()
because it frees the list iterator.

Fixes: d95984b5580d ("rtw88: fix memory overrun and memory leak during hw_scan")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220203082532.GA25151@kili
drivers/net/wireless/realtek/rtw88/fw.c