Search Linux Wireless

Re: [RFC PATCH 4/7] 802.11w: Use BIP (AES-128-CMAC)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -603,30 +605,38 @@ static int nl80211_set_key(struct sk_buf
>  	int err;
>  	struct net_device *dev;
>  	u8 key_idx;
> +	int (*func)(struct wiphy *wiphy, struct net_device *netdev,
> +		    u8 key_index);
>  
>  	if (!info->attrs[NL80211_ATTR_KEY_IDX])
>  		return -EINVAL;
>  
>  	key_idx = nla_get_u8(info->attrs[NL80211_ATTR_KEY_IDX]);
>  
> -	if (key_idx > 3)
> +	if (key_idx > 5)
>  		return -EINVAL;
>  
>  	/* currently only support setting default key */
> -	if (!info->attrs[NL80211_ATTR_KEY_DEFAULT])
> +	if (!info->attrs[NL80211_ATTR_KEY_DEFAULT] &&
> +	    !info->attrs[NL80211_ATTR_KEY_DEFAULT_MGMT])
>  		return -EINVAL;

I think this should probably check the key index depending on the type,
i.e. only permit 4 and 5 for mgmt and 0-3 for data keys.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux