Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2018-12-21 20:24:59 +0100
committerMichal Kubecek <mkubecek@suse.cz>2018-12-21 20:24:59 +0100
commit9d82d2099a0bad05799b62f8d663b1126c419d75 (patch)
tree5fb961e74e95da88fe76b2a1e41fa44a52e61106
parent6e6f3bca248a833b6893299359b82ffdd1541117 (diff)
rtlwifi: Fix leak of skb when processing C2H_BT_INFO
(bsc#1116448).
-rw-r--r--patches.suse/rtlwifi-Fix-leak-of-skb-when-processing-C2H_BT_INFO.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.suse/rtlwifi-Fix-leak-of-skb-when-processing-C2H_BT_INFO.patch b/patches.suse/rtlwifi-Fix-leak-of-skb-when-processing-C2H_BT_INFO.patch
new file mode 100644
index 0000000000..c154632d37
--- /dev/null
+++ b/patches.suse/rtlwifi-Fix-leak-of-skb-when-processing-C2H_BT_INFO.patch
@@ -0,0 +1,40 @@
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Sat, 17 Nov 2018 20:55:03 -0600
+Subject: rtlwifi: Fix leak of skb when processing C2H_BT_INFO
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Patch-mainline: v4.20 or v4.20-rc8 (next release)
+Git-commit: 8cfa272b0d321160ebb5b45073e39ef0a6ad73f2
+References: bsc#1116448
+
+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@gmail.com>
+Cc: Francisco Machado Magalhães Neto <franmagneto@gmail.com>
+Cc: Ping-Ke Shih <pkshih@realtek.com>
+Cc: Stable <stable@vger.kernel.org> # 4.18+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ drivers/net/wireless/realtek/rtlwifi/base.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- 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;
+ }
+
diff --git a/series.conf b/series.conf
index 2ba3ba5534..089f6ca666 100644
--- a/series.conf
+++ b/series.conf
@@ -309,6 +309,7 @@
# Wireless Networking
########################################################
patches.suse/b43-missing-firmware-info.patch
+ patches.suse/rtlwifi-Fix-leak-of-skb-when-processing-C2H_BT_INFO.patch
########################################################
# ISDN