Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-13 15:52:45 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-15 11:46:07 +0200
commita6b6409d8418f21589af3f7c65570a3375ce6ee3 (patch)
tree13feab99c7718ff6de68420d816ae84581b9b87e
parent8a701512f48853cea33e275ac4f9cd77352cda2a (diff)
staging: rtlwifi: rtl8822b: fix to avoid potential NULL pointer
dereference (bsc#1111666).
-rw-r--r--patches.drivers/staging-rtlwifi-rtl8822b-fix-to-avoid-potential-NULL.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.drivers/staging-rtlwifi-rtl8822b-fix-to-avoid-potential-NULL.patch b/patches.drivers/staging-rtlwifi-rtl8822b-fix-to-avoid-potential-NULL.patch
new file mode 100644
index 0000000000..79b9a6da84
--- /dev/null
+++ b/patches.drivers/staging-rtlwifi-rtl8822b-fix-to-avoid-potential-NULL.patch
@@ -0,0 +1,37 @@
+From d70d70aec9632679dd00dcc1b1e8b2517e2c7da0 Mon Sep 17 00:00:00 2001
+From: Aditya Pakki <pakki001@umn.edu>
+Date: Wed, 20 Mar 2019 12:02:49 -0500
+Subject: [PATCH] staging: rtlwifi: rtl8822b: fix to avoid potential NULL pointer dereference
+Git-commit: d70d70aec9632679dd00dcc1b1e8b2517e2c7da0
+Patch-mainline: v5.1-rc3
+References: bsc#1111666
+
+skb allocated via dev_alloc_skb can fail and return a NULL pointer.
+This patch avoids such a scenario and returns, consistent with other
+invocations.
+
+Signed-off-by: Aditya Pakki <pakki001@umn.edu>
+Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/staging/rtlwifi/rtl8822be/fw.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/staging/rtlwifi/rtl8822be/fw.c b/drivers/staging/rtlwifi/rtl8822be/fw.c
+index f061dd1382aa..cf6b7a80b753 100644
+--- a/drivers/staging/rtlwifi/rtl8822be/fw.c
++++ b/drivers/staging/rtlwifi/rtl8822be/fw.c
+@@ -743,6 +743,8 @@ void rtl8822be_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
+ u1_rsvd_page_loc, 3);
+
+ skb = dev_alloc_skb(totalpacketlen);
++ if (!skb)
++ return;
+ memcpy((u8 *)skb_put(skb, totalpacketlen), &reserved_page_packet,
+ totalpacketlen);
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index f02a36edc7..3c085f9b4b 100644
--- a/series.conf
+++ b/series.conf
@@ -45484,6 +45484,7 @@
patches.drivers/serial-sh-sci-Fix-setting-SCSCR_TIE-while-transferri.patch
patches.drivers/Disable-kgdboc-failed-by-echo-space-to-sys-module-kg.patch
patches.drivers/staging-rtl8188eu-Fix-potential-NULL-pointer-derefer.patch
+ patches.drivers/staging-rtlwifi-rtl8822b-fix-to-avoid-potential-NULL.patch
patches.drivers/staging-rtl8712-uninitialized-memory-in-read_bbreg_h.patch
patches.drivers/staging-vt6655-Fix-interrupt-race-condition-on-devic.patch
patches.drivers/staging-vt6655-Remove-vif-check-from-vnt_interrupt.patch