summaryrefslogtreecommitdiff
path: root/core/utils
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils')
-rw-r--r--core/utils/logging/src/wlan_logging_sock_svc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c
index 4396139f6c18..a3f45d18f09a 100644
--- a/core/utils/logging/src/wlan_logging_sock_svc.c
+++ b/core/utils/logging/src/wlan_logging_sock_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -887,6 +887,13 @@ static int wlan_logging_proc_sock_rx_msg(struct sk_buff *skb)
return -EINVAL;
}
+ if (wnl->wmsg.length > skb->data_len) {
+ LOGGING_TRACE(QDF_TRACE_LEVEL_ERROR,
+ "%s: invalid length msgLen:%x skb data_len:%x\n",
+ __func__, wnl->wmsg.length, skb->data_len);
+ return -EINVAL;
+ }
+
if (gapp_pid != INVALID_PID) {
if (wnl->nlh.nlmsg_pid > gapp_pid) {
gapp_pid = wnl->nlh.nlmsg_pid;