Patch "mac80211_hwsim: validate number of different channels" has been added to the 4.14-stable tree
This is a note to let you know that I've just added the patch titled
mac80211_hwsim: validate number of different channels
to the 4.14-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:
mac80211_hwsim-validate-number-of-different-channels.patch
and it can be found in the queue-4.14 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
51a1aaa631c90223888d8beac4d649dc11d2ca55Mon Sep 17 00:00:00 2001
From: Johannes Berg <[email protected]>
Date: Mon, 15 Jan 2018 09:32:36 +0100
Subject: mac80211_hwsim: validate number of different channels
From: Johannes Berg <[email protected]>
commit 51a1aaa631c90223888d8beac4d649dc11d2ca55 upstream.
When creating a new radio on the fly, hwsim allows this to be done with an arbitrary number of channels, but cfg80211 only supports a limited number of simultaneous channels, leading to a warning.
Fix this by validating the number - this requires moving the define for the maximum out to a visible header file.
--- drivers/net/wireless/mac80211_hwsim.c | 5 +++++ include/net/cfg80211.h | 2 ++ net/wireless/core.h | 2 -- 3 files changed, 7 insertions(+), 2 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +5 -0
@@ -3119,6 +3119,11 @@ static int hwsim_new_radio_nl(struct sk_if (info->attrs[HWSIM_ATTR_CHANNELS ]) param.channels =nla_get_u32 (info->attrs[HWSIM_ATTR_CHANNELS ]); +if (param.channels >CFG80211_MAX_NUM_DIFFERENT_CHANNELS ) { +GENL_SET_ERR_MSG (info,"too many channels specified" ); +return -EINVAL ; + } +if (info->attrs[HWSIM_ATTR_NO_VIF ]) param.no_vif = true;
include/net/cfg80211.h +2 -0
@@ -815,6 +815,8 @@ struct cfg80211_csa_settings {u8 count; }; +#define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10 +/** * struct iface_combination_params - input parameters for interface combinations *
net/wireless/core.h +0 -2
@@ -502,8 +502,6 @@ void cfg80211_stop_p2p_device(struct cfgvoid cfg80211_stop_nan (struct cfg80211_registered_device *rdev,struct wireless_dev *wdev); -#define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10 -#ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS #define CFG80211_DEV_WARN_ON (cond) WARN_ON(cond)#else
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/cfg80211-check-dev_set_name-return-value.patch queue-4.14/mac80211_hwsim-validate-number-of-different-channels.patch