瀏覽代碼

qcacmn: Possible information leak due to uninitialized data

In qdf_trace_hex_dump() API, linebuf array is not initialized where
it is used to print in the form of string in qdf_trace_msg() API,
this may cause information leak.

To address this issue, initialize the linebuf array to zero.

Change-Id: If2fe200eb16b28f7fff4413873c1d149716fb1a7
CRs-Fixed: 2232012
Dundi Raviteja 6 年之前
父節點
當前提交
dd1d8ba52a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      qdf/linux/src/qdf_trace.c

+ 1 - 1
qdf/linux/src/qdf_trace.c

@@ -361,7 +361,7 @@ void qdf_trace_hex_dump(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
 		return;
 
 	while (buf_len > 0) {
-		unsigned char linebuf[BUFFER_SIZE];
+		unsigned char linebuf[BUFFER_SIZE] = {0};
 		int linelen = min(buf_len, ROW_SIZE);
 
 		buf_len -= ROW_SIZE;