Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Stange <nstange@suse.de>2019-06-18 10:57:36 +0200
committerNicolai Stange <nstange@suse.de>2019-06-18 11:18:55 +0200
commit8a4f552320cb2382683db1a4d8529b6343582e26 (patch)
treefc3686aa5001272c24818da1fa44b8a6eb6bffe1
parent01c452ed2986bfe8889f2aaee95f9f8512b9a12f (diff)
bsc#1136446: get rid of unwanted dependency on cfg80211.ko
The fix for bsc#1136446, CVE-2019-3846 ("Heap Overflow in mwifiex_update_bss_desc_with_ie function of Marvell Wifi Driver in Linux kernel") introduced a dependency on cfg80211.ko from the live patch module by mistake. It isn't a serious problem, but not really nice either. Fix it up. Fixes: 01c452ed2986 ('Fix for CVE-2019-3846 ("Heap Overflow in mwifiex_update_bss_desc_with_ie function of Marvell Wifi Driver in Linux kernel")') References: bsc#1136446 Signed-off-by: Nicolai Stange <nstange@suse.de>
-rw-r--r--bsc1136446/livepatch_bsc1136446.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/bsc1136446/livepatch_bsc1136446.c b/bsc1136446/livepatch_bsc1136446.c
index 70313b0..cb5c26b 100644
--- a/bsc1136446/livepatch_bsc1136446.c
+++ b/bsc1136446/livepatch_bsc1136446.c
@@ -81,6 +81,8 @@ static int (*klp_mwifiex_update_vs_ie)(const u8 *ies, int ies_len,
unsigned int oui, u8 oui_type);
static void (*klp__mwifiex_dbg)(const struct mwifiex_adapter *adapter, int mask,
const char *fmt, ...);
+static const u8 *(*klp_cfg80211_find_vendor_ie)(unsigned int oui, int oui_type,
+ const u8 *ies, int len);
static struct klp_kallsyms_reloc klp_funcs[] = {
{ "mwifiex_update_uap_custom_ie",
@@ -88,6 +90,8 @@ static struct klp_kallsyms_reloc klp_funcs[] = {
{ "mwifiex_update_vs_ie",
(void *)&klp_mwifiex_update_vs_ie, "mwifiex" },
{ "_mwifiex_dbg", (void *)&klp__mwifiex_dbg, "mwifiex" },
+ { "cfg80211_find_vendor_ie", (void *)&klp_cfg80211_find_vendor_ie,
+ "cfg80211" },
};
/* from drivers/net/wireless/marvell/mwifiex/decl.h */
@@ -854,10 +858,10 @@ static int klp_mwifiex_uap_parse_tail_ies(struct mwifiex_private *priv,
break;
case WLAN_EID_VENDOR_SPECIFIC:
/* Skip only Microsoft WMM IE */
- if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
- WLAN_OUI_TYPE_MICROSOFT_WMM,
- (const u8 *)hdr,
- hdr->len + sizeof(struct ieee_types_header)))
+ if (klp_cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+ WLAN_OUI_TYPE_MICROSOFT_WMM,
+ (const u8 *)hdr,
+ hdr->len + sizeof(struct ieee_types_header)))
break;
default:
/*
@@ -883,9 +887,9 @@ static int klp_mwifiex_uap_parse_tail_ies(struct mwifiex_private *priv,
/* parse only WPA vendor IE from tail, WMM IE is configured by
* bss_config command
*/
- vendorhdr = (void *)cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
- WLAN_OUI_TYPE_MICROSOFT_WPA,
- info->tail, info->tail_len);
+ vendorhdr = (void *)klp_cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+ WLAN_OUI_TYPE_MICROSOFT_WPA,
+ info->tail, info->tail_len);
if (vendorhdr) {
/*
* Fix bsc#1136935