OSDN Git Service

staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc
authorAditya Pakki <pakki001@umn.edu>
Wed, 20 Mar 2019 17:21:35 +0000 (12:21 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 07:20:16 +0000 (09:20 +0200)
commitd55bfd0746aeb4be950cf80c25296a0675ac9199
treebfda699ac55c4db4c8bce99d6aae0cd4ab8a3cd1
parentbfa4cd06a902913639043f753026a65d602e0a9d
staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc

[ Upstream commit 7671ce0d92933762f469266daf43bd34d422d58c ]

hwxmits is allocated via kcalloc and not checked for failure before its
dereference. The patch fixes this problem by returning error upstream
in rtl8723bs, rtl8188eu.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Acked-by: Mukesh Ojha <mojha@codeaurora.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/include/rtw_xmit.h
drivers/staging/rtl8723bs/core/rtw_xmit.c
drivers/staging/rtl8723bs/include/rtw_xmit.h