Just three fixes:
* extended key ID key installation * regulatory processing * possible memory leak in an error path -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEH1e1rEeCd0AIMq6MB8qZga/fl8QFAl1dFXcACgkQB8qZga/f l8RzPg/+ORVI2CAQBLfytpGopN4/3P+lIShuPoultt3chwJBqY3yfp39U9BI3mZR sWlfdocPGSr+Wh/NgcObOxz9rINips75gngQt9diqxyUw73LxDaiXpfRH8WrFyOM ikQRlFOmc+vbopt7QUc66MiF9vJ0ZaUz9cC3ZkKR2KJbjCfS55pGeooUlz643lx3 wAZmLbpvYWSi/pg5eCU/WuK2wIiHBW/Bq/TTUIPAY2VdclGNqa8Yuy255MZlqL5a l70mzKDf4yAUh61p226deCOmSoPoPxCxQgt3gGcK0nUC3x01/Qjj/exioqtgykyo Ox/xGbuqBxynjPpVOcsaN0AfRnd80lDDdKuklGGnJHyKdywzMMnsn+zUrh2KRC/q DazFWSvnk3HM3+Qrh+mriDr3O9X3dDyPMSH53xPoF8o7akm6uDHqnquFTSgqb+7s gBvbjNWox6/o5qxD3V/eO8PoyH0kofsmVctFZXeHm4l6iYrc+PTgdjksawFd3kra CGmfm3tIeAyVTrh/VzmQlC/niPz9m6lQvEVIIiMsdLdl4ekLYVAJfh2it6WJmsXv Rt9Q29ttdvrrBIEnBCymKNLfxTRJ8VDCQpGZeJbTDO/JZos9UXpwlyIA2kmiiw+J LsGLVoII1wzwbnGi1QabTh3jk0RKDf4F/qhKyM2cGzaJM5SsKwA= =t8Z8 -----END PGP SIGNATURE----- Merge tag 'mac80211-for-davem-2019-08-21' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just three fixes: * extended key ID key installation * regulatory processing * possible memory leak in an error path ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Коммит
33dc03da87
|
@ -1546,6 +1546,11 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
if (is_multicast_ether_addr(mac))
|
||||
return -EINVAL;
|
||||
|
||||
if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER) &&
|
||||
sdata->vif.type == NL80211_IFTYPE_STATION &&
|
||||
!sdata->u.mgd.associated)
|
||||
return -EINVAL;
|
||||
|
||||
sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
|
||||
if (!sta)
|
||||
return -ENOMEM;
|
||||
|
@ -1553,10 +1558,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
|
||||
sta->sta.tdls = true;
|
||||
|
||||
if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION &&
|
||||
!sdata->u.mgd.associated)
|
||||
return -EINVAL;
|
||||
|
||||
err = sta_apply_parameters(local, sta, params);
|
||||
if (err) {
|
||||
sta_info_free(local, sta);
|
||||
|
|
|
@ -2788,7 +2788,7 @@ static void reg_process_pending_hints(void)
|
|||
|
||||
/* When last_request->processed becomes true this will be rescheduled */
|
||||
if (lr && !lr->processed) {
|
||||
reg_process_hint(lr);
|
||||
pr_debug("Pending regulatory request, waiting for it to be processed...\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -233,25 +233,30 @@ int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev,
|
|||
|
||||
switch (params->cipher) {
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
/* Extended Key ID can only be used with CCMP/GCMP ciphers */
|
||||
if ((pairwise && key_idx) ||
|
||||
params->mode != NL80211_KEY_RX_TX)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
case WLAN_CIPHER_SUITE_CCMP_256:
|
||||
case WLAN_CIPHER_SUITE_GCMP:
|
||||
case WLAN_CIPHER_SUITE_GCMP_256:
|
||||
/* IEEE802.11-2016 allows only 0 and - when using Extended Key
|
||||
* ID - 1 as index for pairwise keys.
|
||||
/* IEEE802.11-2016 allows only 0 and - when supporting
|
||||
* Extended Key ID - 1 as index for pairwise keys.
|
||||
* @NL80211_KEY_NO_TX is only allowed for pairwise keys when
|
||||
* the driver supports Extended Key ID.
|
||||
* @NL80211_KEY_SET_TX can't be set when installing and
|
||||
* validating a key.
|
||||
*/
|
||||
if (params->mode == NL80211_KEY_NO_TX) {
|
||||
if (!wiphy_ext_feature_isset(&rdev->wiphy,
|
||||
NL80211_EXT_FEATURE_EXT_KEY_ID))
|
||||
if ((params->mode == NL80211_KEY_NO_TX && !pairwise) ||
|
||||
params->mode == NL80211_KEY_SET_TX)
|
||||
return -EINVAL;
|
||||
else if (!pairwise || key_idx < 0 || key_idx > 1)
|
||||
if (wiphy_ext_feature_isset(&rdev->wiphy,
|
||||
NL80211_EXT_FEATURE_EXT_KEY_ID)) {
|
||||
if (pairwise && (key_idx < 0 || key_idx > 1))
|
||||
return -EINVAL;
|
||||
} else if ((pairwise && key_idx) ||
|
||||
params->mode == NL80211_KEY_SET_TX) {
|
||||
} else if (pairwise && key_idx) {
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче