]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rsi: Fix NULL pointer dereference in kmalloc
authorAditya Pakki <pakki001@umn.edu>
Sat, 23 Mar 2019 20:49:16 +0000 (15:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:23 +0000 (06:43 -0700)
commit90905286c19176b2806a0b277610eb17b8334263
treeb38ed07efb5d0ee54299058fb8496f82cda68427
parentae745a8b592d44c31b9b657051863e15a61a6344
rsi: Fix NULL pointer dereference in kmalloc

[ Upstream commit d5414c2355b20ea8201156d2e874265f1cb0d775 ]

kmalloc can fail in rsi_register_rates_channels but memcpy still attempts
to write to channels. The patch replaces these calls with kmemdup and
passes the error upstream.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/rsi/rsi_91x_mac80211.c