qcacmn: Add sanity check to avoid len overflow issue in WMI event data

In WMI/WMA, data from event buffer from FW is used without
sanity checks for upper limit in multiple places. This might
lead to a potential integer overflow further leading to buffer
corruption

Add upper bound checks for max limit of event buffer (1536)
in all affected places to prevent the potential integer
overflow

Change-Id: Ic9194a27c4a4c63fc68ff7fc61165a53e66ca4f4
CRs-Fixed: 2095545
这个提交包含在:
Varun Reddy Yeturu
2017-08-20 13:41:02 -07:00
提交者 snandini
父节点 6af738bb71
当前提交 1d25d6d7fc
修改 2 个文件,包含 8 行新增0 行删除

查看文件

@@ -93,6 +93,7 @@
#define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */
#define WMI_NLO_FREQ_THRESH 1000 /* in MHz */
#define WMI_SVC_MSG_MAX_SIZE 1536
#define MAX_UTF_EVENT_LENGTH 2048
#define MAX_WMI_UTF_LEN 252
#define MAX_WMI_QVIT_LEN 252