From 0060befaa30396f19ede62a2c2a6b6889bdedb78 Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Fri, 17 Feb 2017 13:56:34 -0800 Subject: [PATCH] qcacld-3.0: validate session for sched scan request Make sure to validate session id in __wlan_hdd_cfg80211_sched_scan_start before processing schedule scan request. Change-Id: I94c5699684c6e416c565f6a10ccf1c060cc91017 CRs-Fixed: 2008634 --- core/hdd/src/wlan_hdd_scan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 4ccf42ae8d5f..7fe5894b3a38 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -2626,6 +2626,9 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, if (0 != ret) return ret; + if (!sme_is_session_id_valid(pHddCtx->hHal, pAdapter->sessionId)) + return -EINVAL; + config = pHddCtx->config; hHal = WLAN_HDD_GET_HAL_CTX(pAdapter); if (NULL == hHal) {