qcacld-3.0: Avoid overflow of roam subcmd params

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

Currently when processing the QCA_NL80211_VENDOR_SUBCMD_ROAM vendor
command, for the following roam commands there are input validation
issues:
	QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_SET_BSSID_PREFS
	QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_SET_BLACKLIST_BSSID

Both of these commands have a "number of BSSIDs" attribute as well as a
list of BSSIDs. However there is no validation that the number of
BSSIDs provided won't overflow the destination buffer.  In addition
there is no validation that the number of BSSIDs actually provided
matches the number of BSSIDs expected.

To address these issues, for the above mentioned commands:
* Verify that the expected number of BSSIDs doesn't exceed the maximum
  allowed number of BSSIDs
* Verify that the actual number of BSSIDs supplied doesn't exceed the
  expected number of BSSIDs
* Only process the actual number of supplied BSSIDs if it is less than
  the expected number of BSSIDs.

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