From: Kalle Valo <kvalo@codeaurora.org>
To: Zekun Shen <bruceshenzk@gmail.com>
Cc: unlisted-recipients:; (no To-header on input) Zekun Shen
<bruceshenzk@gmail.com>, "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ath10k: fix memcpy size from untrusted input
Date: Tue, 23 Jun 2020 07:44:08 +0000 (UTC) [thread overview]
Message-ID: <20200623074408.65E75C433CA@smtp.codeaurora.org> (raw)
In-Reply-To: <20200616132544.17478-1-bruceshenzk@gmail.com>
Zekun Shen <bruceshenzk@gmail.com> wrote:
> A compromized ath10k peripheral is able to control the size argument
> of memcpy in ath10k_pci_hif_exchange_bmi_msg.
>
> The min result from previous line is not used as the size argument
> for memcpy. Instead, xfer.resp_len comes from untrusted stream dma
> input. The value comes from "nbytes" in ath10k_pci_bmi_recv_data,
> which is set inside _ath10k_ce_completed_recv_next_nolock with the line
>
> nbytes = __le16_to_cpu(sdesc.nbytes);
>
> sdesc is a stream dma region which device can write to.
>
> Signed-off-by: Zekun Shen <bruceshenzk@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
aed95297250f ath10k: pci: fix memcpy size of bmi response
--
https://patchwork.kernel.org/patch/11607461/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2020-06-23 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87tuzbihbg.fsf@codeaurora.org>
2020-06-16 13:25 ` [PATCH] net: ath10k: fix memcpy size from untrusted input Zekun Shen
2020-06-23 7:44 ` Kalle Valo [this message]
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=20200623074408.65E75C433CA@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=bruceshenzk@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).