[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191107201702.27023-4-lee.jones@linaro.org>
Date: Thu, 7 Nov 2019 20:16:56 +0000
From: Lee Jones <lee.jones@...aro.org>
To: gregkh@...gle.com
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Takashi Iwai <tiwai@...e.de>,
Kalle Valo <kvalo@...eaurora.org>,
Sasha Levin <sashal@...nel.org>,
Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 04/10] mwifiex: Abort at too short BSS descriptor element
From: Takashi Iwai <tiwai@...e.de>
[ Upstream commit 685c9b7750bfacd6fc1db50d86579980593b7869 ]
Currently mwifiex_update_bss_desc_with_ie() implicitly assumes that
the source descriptor entries contain the enough size for each type
and performs copying without checking the source size. This may lead
to read over boundary.
Fix this by putting the source size check in appropriate places.
Signed-off-by: Takashi Iwai <tiwai@...e.de>
Signed-off-by: Kalle Valo <kvalo@...eaurora.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Change-Id: I8812db5f71b733e14573cacb6136e8a1a23036df
---
drivers/net/wireless/mwifiex/scan.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 81a50d8af370..cff755475bc0 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1296,6 +1296,9 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
break;
case WLAN_EID_VENDOR_SPECIFIC:
+ if (element_len + 2 < sizeof(vendor_ie->vend_hdr))
+ return -EINVAL;
+
vendor_ie = (struct ieee_types_vendor_specific *)
current_ptr;
--
2.24.0
Powered by blists - more mailing lists