Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCho, Yu-Chen <acho@suse.com>2019-10-22 14:32:40 +0800
committerCho, Yu-Chen <acho@suse.com>2019-10-22 14:32:40 +0800
commit39802a7fac95392e2c3c443d676fd1cc6c71b910 (patch)
tree8e1e3773309facd29c26ba55f0278eea675392bd
parent481da9ba3a36fa794f1b816fd4eca3b227ce7179 (diff)
rtlwifi: Fix potential overflow on P2P code (bsc#1154372
CVE-2019-17666).
-rw-r--r--patches.suse/rtlwifi-Fix-potential-overflow-on-P2P-code.patch38
-rw-r--r--series.conf1
2 files changed, 39 insertions, 0 deletions
diff --git a/patches.suse/rtlwifi-Fix-potential-overflow-on-P2P-code.patch b/patches.suse/rtlwifi-Fix-potential-overflow-on-P2P-code.patch
new file mode 100644
index 0000000000..33cee0caf3
--- /dev/null
+++ b/patches.suse/rtlwifi-Fix-potential-overflow-on-P2P-code.patch
@@ -0,0 +1,38 @@
+From: Laura Abbott <labbott@redhat.com>
+Date: Fri, 18 Oct 2019 07:43:21 -0400
+Subject: [PATCH] rtlwifi: Fix potential overflow on P2P code
+Patch-mainline: Submitted, https://lkml.org/lkml/2019/10/18/557
+References: bsc#1154372 CVE-2019-17666
+
+Nicolas Waisman noticed that even though noa_len is checked for
+a compatible length it's still possible to overrun the buffers
+of p2pinfo since there's no check on the upper bound of noa_num.
+Bound noa_num against P2P_MAX_NOA_NUM.
+
+Reported-by: Nicolas Waisman <nico@semmle.com>
+Signed-off-by: Laura Abbott <labbott@redhat.com>
+Acked-by: Cho, Yu-Chen <acho@suse.com>
+---
+ drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/wireless/realtek/rtlwifi/ps.c
++++ b/drivers/net/wireless/realtek/rtlwifi/ps.c
+@@ -772,6 +772,8 @@ static void rtl_p2p_noa_ie(struct ieee80
+ return;
+ } else {
+ noa_num = (noa_len - 2) / 13;
++ if (noa_num > P2P_MAX_NOA_NUM)
++ noa_num = P2P_MAX_NOA_NUM;
+ }
+ noa_index = ie[3];
+ if (rtlpriv->psc.p2p_ps_info.p2p_ps_mode ==
+@@ -866,6 +868,8 @@ static void rtl_p2p_action_ie(struct iee
+ return;
+ } else {
+ noa_num = (noa_len - 2) / 13;
++ if (noa_num > P2P_MAX_NOA_NUM)
++ noa_num = P2P_MAX_NOA_NUM;
+ }
+ noa_index = ie[3];
+ if (rtlpriv->psc.p2p_ps_info.p2p_ps_mode ==
diff --git a/series.conf b/series.conf
index f2f5b52f52..10c5a00b7c 100644
--- a/series.conf
+++ b/series.conf
@@ -25453,6 +25453,7 @@
patches.kabi/bt_accept_enqueue-kabi-workaround.patch
patches.kabi/mwifiex-ieee-types-kabi-fix.patch
patches.suse/libertas-fix-a-potential-NULL-pointer-dereference.patch
+ patches.suse/rtlwifi-Fix-potential-overflow-on-P2P-code.patch
########################################################
# ISDN