qcacld-5.0: Fix the possible OOB write in country IE unpack

Fix the possible OOB write in unpacking the country IE due to
the IE length check against integer division.

CRs-Fixed: 3910626
Change-Id: I800290ab7285fb46ed43a46ce38967046b4881fa
This commit is contained in:
Kiran Kumar Lokere
2024-09-09 16:07:29 -07:00
committed by Michael Bestas
parent 388e2df8b9
commit c85851f935

View File

@@ -133,7 +133,7 @@ typedef struct sIEDefn {
#define DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed) \ #define DOT11F_PARAMETER_CHECK2(pSrc, pBuf, nBuf, pnConsumed) \
do { \ do { \
if (!pSrc || IsBadReadPtr(pSrc, 4))\ if (!pSrc || IsBadReadPtr(pSrc, 4))\
eturn DOT11F_BAD_INPUT_BUFFER; \ return DOT11F_BAD_INPUT_BUFFER; \
if (!pBuf || IsBadWritePtr(pBuf, nBuf))\ if (!pBuf || IsBadWritePtr(pBuf, nBuf))\
return DOT11F_BAD_OUTPUT_BUFFER; \ return DOT11F_BAD_OUTPUT_BUFFER; \
if (!nBuf)\ if (!nBuf)\