summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-07-17 15:00:56 +0300
committerJohannes Berg <johannes.berg@intel.com>2014-07-18 09:53:56 +0200
commit8c26d458394be44e135d1c6bd4557e1c4e1a0535 (patch)
treea7568b79cc1c4bce6eb0064bc37c48e34711f050 /net/wireless
parent08b9939997df30e42a228e1ecb97f99e9c8ea84e (diff)
downloadlinux-8c26d458394be44e135d1c6bd4557e1c4e1a0535.tar.bz2
cfg80211: fix mic_failure tracing
tsc can be NULL (mac80211 currently always passes NULL), resulting in NULL-dereference. check before copying it. Cc: stable@vger.kernel.org Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/trace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 560ed77084e9..7cc887f9da11 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2094,7 +2094,8 @@ TRACE_EVENT(cfg80211_michael_mic_failure,
MAC_ASSIGN(addr, addr);
__entry->key_type = key_type;
__entry->key_id = key_id;
- memcpy(__entry->tsc, tsc, 6);
+ if (tsc)
+ memcpy(__entry->tsc, tsc, 6);
),
TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm",
NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type,