Skip to contentSkip to conversation

Patch "staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jun 18, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
staging-rtl8188eu-prevent-an-underflow-in-rtw_check_beacon_data.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 784047eb2d3405a35087af70cba46170c5576b25 Mon Sep 17 00:00:00 2001

From: Dan Carpenter <[email protected]>
Date: Sat, 22 Apr 2017 13:47:23 +0300
Subject: staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()

From: Dan Carpenter <[email protected]>

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")
---
 drivers/staging/rtl8188eu/core/rtw_ap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_ap.c +1 -1
@@ -894,7 +894,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;

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/drivers-misc-c2port-c2port-duramar2150.c-checking-for-null-instead-of-is_err.patch queue-4.4/staging-rtl8188eu-prevent-an-underflow-in-rtw_check_beacon_data.patch