mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
2d139450a3
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
From 1b5e2423164b3670e8bc9174e4762d297990deff Mon Sep 17 00:00:00 2001
|
|
From: Arend van Spriel <arend.vanspriel@broadcom.com>
|
|
Date: Thu, 14 Feb 2019 13:43:47 +0100
|
|
Subject: [PATCH] brcmfmac: assure SSID length from firmware is limited
|
|
|
|
The SSID length as received from firmware should not exceed
|
|
IEEE80211_MAX_SSID_LEN as that would result in heap overflow.
|
|
|
|
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
|
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
|
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
|
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
---
|
|
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
@@ -3499,6 +3499,8 @@ brcmf_wowl_nd_results(struct brcmf_if *i
|
|
}
|
|
|
|
netinfo = brcmf_get_netinfo_array(pfn_result);
|
|
+ if (netinfo->SSID_len > IEEE80211_MAX_SSID_LEN)
|
|
+ netinfo->SSID_len = IEEE80211_MAX_SSID_LEN;
|
|
memcpy(cfg->wowl.nd->ssid.ssid, netinfo->SSID, netinfo->SSID_len);
|
|
cfg->wowl.nd->ssid.ssid_len = netinfo->SSID_len;
|
|
cfg->wowl.nd->n_channels = 1;
|