Patch "staging: wilc1000: add check for kmalloc allocation failure." has been added to the 4.9-stable tree
Subsystems (2)
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.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
staging-wilc1000-add-check-for-kmalloc-allocation-failure.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Colin Ian King <[email protected]>
Date: Tue, 28 Feb 2017 11:47:33 +0000
Subject: staging: wilc1000: add check for kmalloc allocation failure.
From: Colin Ian King <[email protected]>
[ 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")
--- drivers/staging/wilc1000/host_interface.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/wilc1000/host_interface.c +2 -0
@@ -1930,6 +1930,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 [email protected] are
queue-4.9/staging-wilc1000-add-check-for-kmalloc-allocation-failure.patch