* re: ath6kl: Allow CCKM AKM and KRK to be configured
@ 2011-11-18 14:09 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-11-18 14:09 UTC (permalink / raw)
To: jouni; +Cc: linux-wireless
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-18 14:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18 14:09 ath6kl: Allow CCKM AKM and KRK to be configured Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).