Search Linux Wireless

re: ath6kl: Allow CCKM AKM and KRK to be configured

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

 



Hello Jouni Malinen,

This is a semi-automatic email about new static checker warnings.

The patch 837cb97e5b72: "ath6kl: Allow CCKM AKM and KRK to be 
configured" from Oct 11, 2011, leads to the following Smatch 
complaint:

drivers/net/wireless/ath/ath6kl/cfg80211.c +939 ath6kl_cfg80211_add_key()
	 warn: variable dereferenced before check 'params' (see line 917)

drivers/net/wireless/ath/ath6kl/cfg80211.c
   916	
   917		if (params->cipher == CCKM_KRK_CIPHER_SUITE) {
                    ^^^^^^^^
new dereference.

   918			if (params->key_len != WMI_KRK_LEN)
   919				return -EINVAL;
   920			return ath6kl_wmi_add_krk_cmd(ar->wmi, vif->fw_vif_idx,
   921						      params->key);
   922		}
   923	
   924		if (key_index < WMI_MIN_KEY_INDEX || key_index > WMI_MAX_KEY_INDEX) {
   925			ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
   926				   "%s: key index %d out of bounds\n", __func__,
   927				   key_index);
   928			return -ENOENT;
   929		}
   930	
   931		key = &vif->keys[key_index];
   932		memset(key, 0, sizeof(struct ath6kl_key));
   933	
   934		if (pairwise)
   935			key_usage = PAIRWISE_USAGE;
   936		else
   937			key_usage = GROUP_USAGE;
   938	
   939		if (params) {
                    ^^^^^^
check.

   940			if (params->key_len > WLAN_MAX_KEY_LEN ||
   941			    params->seq_len > sizeof(key->seq))

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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