qcacld-3.0: Avoid overflow of EPNO network list

This is a qcacld-2.0 to qcacld-3.0 propagation.

Currently when processing an EPNO vendor command the "num networks"
attribute is limit checked and if it exceeds a MAX value then it is
reset to that MAX value. This value is then used to calculate the size
of the buffer allocated to hold the internal representation of the
request. However later when the network attributes are parsed there is
no check to make sure the number of networks processed does not exceed
the (possibly modified) "num networks" used to allocate memory, and as
a result a buffer overflow can occur. Address this issue by aborting
the network parsing once "num networks" records have been parsed.

Change-Id: I6e5f321d23471d082bb000ad0422ea9baa76577a
CRs-Fixed: 1087807
1 file changed
tree: c8ea6cc20060c1c7e6f6e3deac3dff4618e2b0e9
  1. core/
  2. uapi/
  3. Android.mk
  4. Kbuild
  5. Kconfig
  6. Makefile
  7. README.txt