From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:55412 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342AbcJENUn (ORCPT ); Wed, 5 Oct 2016 09:20:43 -0400 Subject: Patch "brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain" has been added to the 4.4-stable tree To: f.fainelli@gmail.com, arend.vanspriel@broadcom.com, gregkh@linuxfoundation.org, kvalo@codeaurora.org Cc: , From: Date: Wed, 05 Oct 2016 15:20:19 +0200 Message-ID: <14756736199936@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 brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain to the 4.4-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: brcmfmac-fix-glob_skb-leak-in-brcmf_sdiod_recv_chain.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 know about it. >>From 3bdae810721b33061d2e541bd78a70f86ca42af3 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 18 Jul 2016 16:24:34 -0700 Subject: brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain From: Florian Fainelli commit 3bdae810721b33061d2e541bd78a70f86ca42af3 upstream. In case brcmf_sdiod_recv_chain() cannot complete a succeful call to brcmf_sdiod_buffrw, we would be leaking glom_skb and not free it as we should, fix this. Reported-by: coverity (CID 1164856) Fixes: a413e39a38573 ("brcmfmac: fix brcmf_sdcard_recv_chain() for host without sg support") Signed-off-by: Florian Fainelli Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c @@ -726,8 +726,10 @@ int brcmf_sdiod_recv_chain(struct brcmf_ return -ENOMEM; err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, false, addr, glom_skb); - if (err) + if (err) { + brcmu_pkt_buf_free_skb(glom_skb); goto done; + } skb_queue_walk(pktq, skb) { memcpy(skb->data, glom_skb->data, skb->len); Patches currently in stable-queue which might be from f.fainelli@gmail.com are queue-4.4/brcmfmac-fix-glob_skb-leak-in-brcmf_sdiod_recv_chain.patch queue-4.4/brcmsmac-free-packet-if-dma_mapping_error-fails-in-dma_rxfill.patch queue-4.4/brcmsmac-initialize-power-in-brcms_c_stf_ss_algo_channel_get.patch