From: Dan Carpenter <dan.carpenter@oracle.com>
To: jouni@qca.qualcomm.com
Cc: linux-wireless@vger.kernel.org
Subject: re: ath6kl: Allow CCKM AKM and KRK to be configured
Date: Fri, 18 Nov 2011 17:09:54 +0300 [thread overview]
Message-ID: <20111118140954.GC9685@elgon.mountain> (raw)
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
reply other threads:[~2011-11-18 14:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111118140954.GC9685@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=jouni@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox