ACK: [SRU][Cosmic][PATCH 1/1] rtlwifi: Fix leak of skb when processing C2H_BT_INFO

Stefan Bader stefan.bader at canonical.com
Tue Jul 2 07:01:41 UTC 2019


On 02.07.19 00:16, Connor Kuehl wrote:
> From: Larry Finger <Larry.Finger at lwfinger.net>
> 
> BugLink: https://bugs.launchpad.net/bugs/1831751
> 
> With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
> C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
> the routine returns without freeing that skb, thereby leaking it.
> 
> This issue has been discussed at https://github.com/lwfinger/rtlwifi_new/issues/401
> and the fix tested there.
> 
> Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing C2H_BT_INFO")
> Reported-and-tested-by: Francisco Machado Magalhães Neto <franmagneto at gmail.com>
> Cc: Francisco Machado Magalhães Neto <franmagneto at gmail.com>
> Cc: Ping-Ke Shih <pkshih at realtek.com>
> Cc: Stable <stable at vger.kernel.org> # 4.18+
> Signed-off-by: Larry Finger <Larry.Finger at lwfinger.net>
> Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
> (cherry picked from commit 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2)
> Signed-off-by: Connor Kuehl <connor.kuehl at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---

OK, though late coming in this sounds like it could make the 4.18 we soon leave
behind more stable. So I would say ok, lets take it.

>  drivers/net/wireless/realtek/rtlwifi/base.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
> index 54c9f6ab0c8c..a46bcf676e42 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/base.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
> @@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct sk_buff *skb)
>  
>  	if (rtl_c2h_fast_cmd(hw, skb)) {
>  		rtl_c2h_content_parsing(hw, skb);
> +		kfree_skb(skb);
>  		return;
>  	}
>  
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190702/d65d8ac2/attachment.sig>


More information about the kernel-team mailing list