Patch "ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ath10k-fix-potential-memory-leak-in-ath10k_wmi_tlv_op_pull_fw_stats.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Nov 28 10:56:34 CET 2017
From: Christian Lamparter <[email protected]>
Date: Thu, 29 Dec 2016 16:12:09 +0200
Subject: ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats()
From: Christian Lamparter <[email protected]>
[ Upstream commit 097e46d2ae90265d1afe141ba6208ba598b79e01 ]
ath10k_wmi_tlv_op_pull_fw_stats() uses tb = ath10k_wmi_tlv_parse_alloc(...) function, which allocates memory. If any of the three error-paths are taken, this tb needs to be freed.
--- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/wmi-tlv.c +9 -3
@@ -1105,8 +1105,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stastruct ath10k_fw_stats_pdev *dst; src = data; -if (data_len <sizeof (*src)) +if (data_len <sizeof (*src)) { +kfree (tb);return -EPROTO ; + } data +=sizeof (*src); data_len -=sizeof (*src);
@@ -1126,8 +1128,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stastruct ath10k_fw_stats_vdev *dst; src = data; -if (data_len <sizeof (*src)) +if (data_len <sizeof (*src)) { +kfree (tb);return -EPROTO ; + } data +=sizeof (*src); data_len -=sizeof (*src);
@@ -1145,8 +1149,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stastruct ath10k_fw_stats_peer *dst; src = data; -if (data_len <sizeof (*src)) +if (data_len <sizeof (*src)) { +kfree (tb);return -EPROTO ; + } data +=sizeof (*src); data_len -=sizeof (*src);
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/ath10k-fix-potential-memory-leak-in-ath10k_wmi_tlv_op_pull_fw_stats.patch