mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
wifi: mac80211: check key taint for beacon protection
This will likely never happen, but for completeness check the key taint flag before using a key for beacon protection. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230301115906.cf2c3fee6f1f.I2f19b3e04e31c99bed3c9dc71935bf513b2cd177@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
3a867c7eef
commit
3ffcc659dc
1 changed files with 6 additions and 0 deletions
|
@ -5115,6 +5115,12 @@ static int ieee80211_beacon_protect(struct sk_buff *skb,
|
|||
tx.key = rcu_dereference(link->default_beacon_key);
|
||||
if (!tx.key)
|
||||
return 0;
|
||||
|
||||
if (unlikely(tx.key->flags & KEY_FLAG_TAINTED)) {
|
||||
tx.key = NULL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tx.local = local;
|
||||
tx.sdata = sdata;
|
||||
__skb_queue_head_init(&tx.skbs);
|
||||
|
|
Loading…
Reference in a new issue