Эх сурвалжийг харах

qcacmn: Handle unsupported EAPOL packet type

In function qdf_fill_wlan_connectivity_log, the unsupported EAPOL
packet types are not dropped.This results in setting the
log_subtype to invalid value zero and the log buffer being forwarded
to wlan_connectivity_log_enqueue. The fix is to drop the unsupported
packets by returning from the function.

The local variable log_buf,of type struct wlan_log_record, is not
null initialized.This could cause some of the  member elements to have
unexpected values.This fix is to null initialize the log_buf structure.

Update Qualcomm copyright to include year 2022

Change-Id: I651329fead1e42282d7811c32eea2359ba970527
CRs-Fixed: 3079947
Namita Nair 3 жил өмнө
parent
commit
09afbc7282

+ 4 - 2
qdf/linux/src/qdf_trace.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -1822,7 +1822,7 @@ void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,
 				    enum qdf_dp_tx_rx_status qdf_tx_status,
 				    uint8_t vdev_id, uint8_t *data)
 {
-	struct wlan_log_record log_buf;
+	struct wlan_log_record log_buf = {0};
 	uint8_t pkt_type;
 
 	log_buf.timestamp_us = qdf_get_time_of_the_day_ms() * 1000;
@@ -1839,6 +1839,8 @@ void qdf_fill_wlan_connectivity_log(enum qdf_proto_type type,
 		} else if (pkt_type == EAPOL_PACKET_TYPE_KEY) {
 			log_buf.log_subtype = qdf_eapol_get_key_type(data,
 								     subtype);
+		} else {
+			return;
 		}
 	} else {
 		return;