From fad99adc80c8fbd5d2fe2b250550d874d82418ba Mon Sep 17 00:00:00 2001 From: Min Liu Date: Thu, 26 Apr 2018 13:17:08 +0800 Subject: [PATCH] qcacld-3.0: Correct AssocId range when stop BSS In __lim_handle_sme_stop_bss_request, it will try to disassociate STAs of which AssocId is from 1 to pMac->lim.gLimAssocStaLimit - 1. However, valid range of AssocId should be from 1 to pMac->lim.gLimAssocStaLimit. This will cause STA and peer leakage when there is an STA using AssocID equal to pMac->lim.gLimAssocStaLimit. Update the uppper limit to pMac->lim.gLimAssocStaLimit accordingly. Change-Id: Ifec315c0ae69f8b93ce8b87601cca7cc13c6bc88 CRs-Fixed: 2230757 --- core/mac/src/pe/lim/lim_process_sme_req_messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index b1ee08d18d41..772d6e8d0fa8 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -2956,7 +2956,7 @@ __lim_handle_sme_stop_bss_request(tpAniSirGlobal pMac, uint32_t *pMsgBuf) */ pMac->lim.gLimIbssCoalescingHappened = false; } - for (i = 1; i < pMac->lim.gLimAssocStaLimit; i++) { + for (i = 1; i <= pMac->lim.gLimAssocStaLimit; i++) { pStaDs = dph_get_hash_entry(pMac, i, &psessionEntry->dph.dphHashTable); if (NULL == pStaDs)