wifi: cfg80211: reject WEP/TKIP with multi-link

This is not possible by spec, so check and reject it in
order to avoid being able to hit such code paths in the
code later.

Link: https://patch.msgid.link/20261013150604.d37bf448de30.Ib47bf264ac9d2502312158503d1ca8aae99496c0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2026-10-13 14:59:03 +02:00
parent 577f690ce5
commit 7a79160f35

View File

@ -426,6 +426,17 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev,
break;
}
switch (params->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
case WLAN_CIPHER_SUITE_TKIP:
if (wdev->valid_links)
return -EINVAL;
break;
default:
break;
}
/*
* Per Wi-Fi Aware v4.0 section 7.1.2, NAN Data interfaces
* shall only use CCMP-128 or GCMP-256.