From a580cc3493117417e7f8362a8298aeb12e0294f0 Mon Sep 17 00:00:00 2001 From: nakul kachhwaha Date: Fri, 15 Mar 2019 17:45:17 +0530 Subject: [PATCH] qcacld-3.0: Validate KCK pointer in GTK Rekey data For FILS based authentication, KCK is not derived. Hence when GTK Offload feature is enabled, supplicant will not pass it to driver with gtk rekey data. Putting a check to validate KCK before copying it to the gtk_req structure. Change-Id: I7089011b4d3fdc4e4785adbe10de651a1b59a121 CRs-Fixed: 2414445 --- core/hdd/src/wlan_hdd_cfg80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index b08b5d374591..d98071873d5d 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -20171,7 +20171,8 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy, gtk_req->replay_counter); wlan_hdd_copy_gtk_kek(gtk_req, data); - qdf_mem_copy(gtk_req->kck, data->kck, NL80211_KCK_LEN); + if (data->kck) + qdf_mem_copy(gtk_req->kck, data->kck, NL80211_KCK_LEN); gtk_req->is_fils_connection = hdd_is_fils_connection(adapter); vdev = hdd_objmgr_get_vdev(adapter); if (!vdev) {