summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2018-06-07 10:03:18 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-07 10:03:18 -0700
commit6886fa0a8408c8dfb1d961407eacbf12e7cb2e32 (patch)
tree920a82149463f18aabf1c4fdee3c737a1d7efaf1
parent5807731baf2b36d06e3c2aa0a699a89c88650d67 (diff)
parentcc6d6bec42fe00075ae16bc5072c4d1f78febcfb (diff)
Merge "qcacld-2.0: Fix information leak issue during memcpy" into wlan-cld2.driver.lnx.1.0
-rw-r--r--CORE/UTILS/FWLOG/dbglog_host.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/CORE/UTILS/FWLOG/dbglog_host.c b/CORE/UTILS/FWLOG/dbglog_host.c
index 8e4201a54cc2..f6a410924203 100644
--- a/CORE/UTILS/FWLOG/dbglog_host.c
+++ b/CORE/UTILS/FWLOG/dbglog_host.c
@@ -2123,6 +2123,9 @@ send_diag_netlink_data(const u_int8_t *buffer, A_UINT32 len, A_UINT32 cmd)
slot->dropped = get_version;
memcpy(slot->payload, buffer, len);
+ /* Need to pad each record to fixed length ATH6KL_FWLOG_PAYLOAD_SIZE */
+ memset(slot->payload + len, 0, ATH6KL_FWLOG_PAYLOAD_SIZE - len);
+
res = nl_srv_bcast_fw_logs(skb_out);
if ((res < 0) && (res != -ESRCH)) {
AR_DEBUG_PRINTF(ATH_DEBUG_RSVD1,
@@ -2185,6 +2188,9 @@ dbglog_process_netlink_data(wmi_unified_t wmi_handle, const u_int8_t *buffer,
slot->dropped = cpu_to_le32(dropped);
memcpy(slot->payload, buffer, len);
+ /* Need to pad each record to fixed length ATH6KL_FWLOG_PAYLOAD_SIZE */
+ memset(slot->payload + len, 0, ATH6KL_FWLOG_PAYLOAD_SIZE - len);
+
res = nl_srv_bcast_fw_logs(skb_out);
if ((res < 0) && (res != -ESRCH))
{