]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: fix memory overrun and memory leak during hw_scan
authorPo-Hao Huang <phhuang@realtek.com>
Fri, 21 Jan 2022 07:08:13 +0000 (15:08 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 31 Jan 2022 15:46:59 +0000 (17:46 +0200)
commit42c3b23b8a37bc79854b7491d4114fe0b57e63b2
tree994e1da9f5c7bc027b33072a5d93c729d60392aa
parent49a1b6cadc32c7444245d31eb1a2139631ac4fa2
rtw88: fix memory overrun and memory leak during hw_scan

Previously we allocated less memory than actual required, overwrite
to the buffer causes the mm module to complaint and raise access
violation faults. Along with potential memory leaks when returned
early. Fix these by passing the correct size and proper deinit flow.

Fixes: 9c973b6628b5 ("rtw88: 8822c: add ieee80211_ops::hw_scan")
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220121070813.9656-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw88/fw.c