This is a note to let you know that I've just added the patch titled
staging: wilc1000: add check for kmalloc allocation failure.
to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su...
The filename of the patch is: staging-wilc1000-add-check-for-kmalloc-allocation-failure.patch and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it.
From foo@baz Mon Mar 19 09:58:12 CET 2018
From: Colin Ian King colin.king@canonical.com Date: Tue, 28 Feb 2017 11:47:33 +0000 Subject: staging: wilc1000: add check for kmalloc allocation failure.
From: Colin Ian King colin.king@canonical.com
[ Upstream commit 6cc0c259d034c6ab48f4e12f505213988e73d380 ]
Add a sanity check that wid.val has been allocated, fixes a null pointer deference on stamac when calling ether_add_copy.
Detected by CoverityScan, CID#1369537 ("Dereference null return value")
Signed-off-by: Colin Ian King colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: Sasha Levin alexander.levin@microsoft.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/staging/wilc1000/host_interface.c | 2 ++ 1 file changed, 2 insertions(+)
--- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -2179,6 +2179,8 @@ static s32 Handle_Get_InActiveTime(struc wid.type = WID_STR; wid.size = ETH_ALEN; wid.val = kmalloc(wid.size, GFP_KERNEL); + if (!wid.val) + return -ENOMEM;
stamac = wid.val; memcpy(stamac, strHostIfStaInactiveT->mac, ETH_ALEN);
Patches currently in stable-queue which might be from colin.king@canonical.com are
queue-4.4/staging-wilc1000-add-check-for-kmalloc-allocation-failure.patch