From 77a35ac15bf229ef60924a2b74ba216107df6ac0 Mon Sep 17 00:00:00 2001 From: bings Date: Fri, 1 Jun 2018 15:10:44 +0800 Subject: [PATCH] qcacld-3.0: Check for non zero buffer pointer for FILS info Currently the length of every FILS information is updated before buffer pointer check which results in invalid update of FILS information. Add non-zero buffer pointer check for all parameters of FILS information. Change-Id: I2065f2f1984da473b5e97ffa25f4ab519e091c5b CRs-Fixed: 2228062 --- core/hdd/src/wlan_hdd_cfg80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index a764d92231e9..616bb70ca8f6 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -18280,6 +18280,14 @@ static bool wlan_hdd_fils_data_in_limits(struct cfg80211_connect_params *req) return false; } + if (!req->fils_erp_rrk || !req->fils_erp_realm || + !req->fils_erp_username) { + hdd_err("buffer incorrect, user=%pK rrk=%pK realm=%pK", + req->fils_erp_username, req->fils_erp_rrk, + req->fils_erp_realm); + return false; + } + return true; }