From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:37072 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbeCPOTi (ORCPT ); Fri, 16 Mar 2018 10:19:38 -0400 Subject: Patch "staging: rtl8822be: fix missing null check on dev_alloc_skb return" has been added to the 4.15-stable tree To: colin.king@canonical.com, Larry.Finger@lwfinger.net, alexander.levin@microsoft.com, gregkh@linuxfoundation.org Cc: , From: Date: Fri, 16 Mar 2018 15:17:00 +0100 Message-ID: <152120982059108@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled staging: rtl8822be: fix missing null check on dev_alloc_skb return to the 4.15-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-rtl8822be-fix-missing-null-check-on-dev_alloc_skb-return.patch and it can be found in the queue-4.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Mar 16 15:11:07 CET 2018 From: Colin Ian King Date: Fri, 17 Nov 2017 14:50:55 +0000 Subject: staging: rtl8822be: fix missing null check on dev_alloc_skb return From: Colin Ian King [ Upstream commit 3eb23426e1749a0483bc4c9b18e51f657569e3ed ] dev_alloc_skb can potentially return NULL, so add a null check to avoid a null pointer dereference on skb Detected by CoverityScan, CID#1454558 ("Dereference on null return") Fixes: 7e5b796cde7e ("staging: r8822be: Add the driver code") Signed-off-by: Colin Ian King Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtlwifi/rtl8822be/fw.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/staging/rtlwifi/rtl8822be/fw.c +++ b/drivers/staging/rtlwifi/rtl8822be/fw.c @@ -464,6 +464,8 @@ bool rtl8822b_halmac_cb_write_data_rsvd_ int count; skb = dev_alloc_skb(size); + if (!skb) + return false; memcpy((u8 *)skb_put(skb, size), buf, size); if (!_rtl8822be_send_bcn_or_cmd_packet(rtlpriv->hw, skb, BEACON_QUEUE)) Patches currently in stable-queue which might be from colin.king@canonical.com are queue-4.15/usbip-vudc-fix-null-pointer-dereference-on-udc-lock.patch queue-4.15/crypto-cavium-fix-memory-leak-on-info.patch queue-4.15/staging-rtl8822be-fix-missing-null-check-on-dev_alloc_skb-return.patch