public inbox for ath11k@lists.infradead.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 09/11] ath11k: fix KASAN warning of ath11k_qmi_wlanfw_wlan_cfg_send
Date: Fri, 14 Aug 2020 10:10:28 +0300	[thread overview]
Message-ID: <1597389030-13887-10-git-send-email-kvalo@codeaurora.org> (raw)
In-Reply-To: <1597389030-13887-1-git-send-email-kvalo@codeaurora.org>

From: Carl Huang <cjhuang@codeaurora.org>

It's caused by reading memory out of boundary from target_ce_config_wlan.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2

Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 529886b1f068..12991a835b8b 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2233,7 +2233,7 @@ static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab)
 	req->tgt_cfg_valid = 1;
 	/* This is number of CE configs */
 	req->tgt_cfg_len = ab->qmi.ce_cfg.tgt_ce_len;
-	for (pipe_num = 0; pipe_num <= req->tgt_cfg_len ; pipe_num++) {
+	for (pipe_num = 0; pipe_num < req->tgt_cfg_len ; pipe_num++) {
 		req->tgt_cfg[pipe_num].pipe_num = ce_cfg[pipe_num].pipenum;
 		req->tgt_cfg[pipe_num].pipe_dir = ce_cfg[pipe_num].pipedir;
 		req->tgt_cfg[pipe_num].nentries = ce_cfg[pipe_num].nentries;
-- 
2.7.4


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  parent reply	other threads:[~2020-08-14  7:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14  7:10 [PATCH 00/11] ath11k: firmware and board file support for PCI devices Kalle Valo
2020-08-14  7:10 ` [PATCH 01/11] ath11k: add support for m3 firmware Kalle Valo
2020-08-17 10:19   ` Kalle Valo
2020-08-14  7:10 ` [PATCH 02/11] ath11k: add board file support for PCI devices Kalle Valo
2020-08-14  7:10 ` [PATCH 03/11] ath11k: fill appropriate QMI service instance id for QCA6390 Kalle Valo
2020-08-14  7:10 ` [PATCH 04/11] ath11k: pci: add read32() and write32() hif operations Kalle Valo
2020-08-14  7:10 ` [PATCH 05/11] ath11k: configure copy engine msi address in CE srng Kalle Valo
2020-08-14  7:10 ` [PATCH 06/11] ath11k: setup ce tasklet for control path Kalle Valo
2020-08-14  7:10 ` [PATCH 07/11] ath11k: allocate smaller chunks of memory for firmware Kalle Valo
2020-08-14  7:10 ` [PATCH 08/11] ath11k: fix memory OOB access in qmi_decode Kalle Valo
2020-08-14  7:10 ` Kalle Valo [this message]
2020-08-14  7:10 ` [PATCH 10/11] ath11k: enable internal sleep clock Kalle Valo
2020-08-14  7:10 ` [PATCH 11/11] ath11k: hal: create hw_srng_config dynamically Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1597389030-13887-10-git-send-email-kvalo@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox