Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714994 > unrolled thread

[PATCH 3.16 087/134] staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()

Started byBen Hutchings <ben@decadent.org.uk>
First post2017-08-18 15:40 +0200
Last post2017-08-18 15:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16 087/134] staging: rtl8188eu: prevent an underflow in  rtw_check_beacon_data() Ben Hutchings <ben@decadent.org.uk> - 2017-08-18 15:40 +0200

#1714994 — [PATCH 3.16 087/134] staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()

FromBen Hutchings <ben@decadent.org.uk>
Date2017-08-18 15:40 +0200
Subject[PATCH 3.16 087/134] staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
Message-ID<ufPFh-4ln-33@gated-at.bofh.it>
3.16.47-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 784047eb2d3405a35087af70cba46170c5576b25 upstream.

The "len" could be as low as -14 so we should check for negatives.

Fixes: 9a7fe54ddc3a ("staging: r8188eu: Add source files for new driver - part 1")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/rtl8188eu/core/rtw_ap.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c
@@ -881,7 +881,7 @@ int rtw_check_beacon_data(struct adapter
 		return _FAIL;
 
 
-	if (len > MAX_IE_SZ)
+	if (len < 0 || len > MAX_IE_SZ)
 		return _FAIL;
 
 	pbss_network->IELength = len;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web