mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-01 03:26:51 +00:00
2cd234d96b
1) Crash/Oops fixes 2) One-line patch for BCM43456 support 3) Fix communication with some specific FullMAC firmwares 4) Potential fix for "Invalid packet id" errors 5) Important helper for reporting FullMAC firmware crashes Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From 46953f97224d56a12ccbe9c6acaa84ca0dab2780 Mon Sep 17 00:00:00 2001
|
|
From: Kangjie Lu <kjlu@umn.edu>
|
|
Date: Fri, 15 Mar 2019 12:04:32 -0500
|
|
Subject: [PATCH] brcmfmac: fix missing checks for kmemdup
|
|
|
|
In case kmemdup fails, the fix sets conn_info->req_ie_len and
|
|
conn_info->resp_ie_len to zero to avoid buffer overflows.
|
|
|
|
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
|
|
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
---
|
|
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
|
@@ -5455,6 +5455,8 @@ static s32 brcmf_get_assoc_ies(struct br
|
|
conn_info->req_ie =
|
|
kmemdup(cfg->extra_buf, conn_info->req_ie_len,
|
|
GFP_KERNEL);
|
|
+ if (!conn_info->req_ie)
|
|
+ conn_info->req_ie_len = 0;
|
|
} else {
|
|
conn_info->req_ie_len = 0;
|
|
conn_info->req_ie = NULL;
|
|
@@ -5471,6 +5473,8 @@ static s32 brcmf_get_assoc_ies(struct br
|
|
conn_info->resp_ie =
|
|
kmemdup(cfg->extra_buf, conn_info->resp_ie_len,
|
|
GFP_KERNEL);
|
|
+ if (!conn_info->resp_ie)
|
|
+ conn_info->resp_ie_len = 0;
|
|
} else {
|
|
conn_info->resp_ie_len = 0;
|
|
conn_info->resp_ie = NULL;
|