diff options
author | Eliad Peller <eliad@wizery.com> | 2014-07-17 15:00:56 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-08-19 14:23:34 +0200 |
commit | a774b9a4f275ebc272f8cc8e6c4f29f601aa695d (patch) | |
tree | 5437e3298362d7c3bd27edd80f16e17f8e3b444c /net | |
parent | f97dcfbb2d1d5664b4c523470f3fe587c7c8a439 (diff) | |
download | lwn-a774b9a4f275ebc272f8cc8e6c4f29f601aa695d.tar.gz lwn-a774b9a4f275ebc272f8cc8e6c4f29f601aa695d.zip |
cfg80211: fix mic_failure tracing
commit 8c26d458394be44e135d1c6bd4557e1c4e1a0535 upstream.
tsc can be NULL (mac80211 currently always passes NULL),
resulting in NULL-dereference. check before copying it.
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/trace.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/trace.h b/net/wireless/trace.h index ba5f0d6614d5..064b471b5275 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h @@ -2029,7 +2029,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, |