From 55e19140ea2143b6f945744bcfebfd637b8758b7 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Wed, 16 Sep 2020 14:44:18 +0530 Subject: [PATCH] qcacld-3.0: Fix null pointer dereference of profile In csr_issue_set_context_req_helper() profile is dereferenced to get the encryption type. Add null check before accessing the profile pointer. Change-Id: I40c148648130918f9da0194ff6e132d55b113008 CRs-Fixed: 2777778 --- core/sme/src/csr/csr_api_roam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 075741d4f2fa..75a155fecfdb 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -10886,7 +10886,8 @@ csr_issue_set_context_req_helper(struct mac_context *mac_ctx, * For open mode authentication, send dummy install key response to * send OBSS scan and QOS event. */ - if (profile->negotiatedUCEncryptionType == eCSR_ENCRYPT_TYPE_NONE) { + if (profile && + profile->negotiatedUCEncryptionType == eCSR_ENCRYPT_TYPE_NONE) { if (unicast) return QDF_STATUS_SUCCESS;