From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Maya Erez <merez@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>,
linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wil6210: fix potential out-of-bounds read
Date: Mon, 29 Apr 2019 10:23:11 -0500 [thread overview]
Message-ID: <579ff8c6-7178-e409-6bc6-bde8ceae581a@embeddedor.com> (raw)
In-Reply-To: <20190429150007.69D8E60741@smtp.codeaurora.org>
On 4/29/19 10:00 AM, Kalle Valo wrote:
> "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>
>> Notice that *rc* can evaluate to up to 5, include/linux/netdevice.h:
>>
>> enum gro_result {
>> GRO_MERGED,
>> GRO_MERGED_FREE,
>> GRO_HELD,
>> GRO_NORMAL,
>> GRO_DROP,
>> GRO_CONSUMED,
>> };
>> typedef enum gro_result gro_result_t;
>>
>> In case *rc* evaluates to 5, we end up having an out-of-bounds read
>> at drivers/net/wireless/ath/wil6210/txrx.c:821:
>>
>> wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n",
>> len, gro_res_str[rc]);
>>
>> Fix this by adding element "GRO_CONSUMED" to array gro_res_str.
>>
>> Addresses-Coverity-ID: 1444666 ("Out-of-bounds read")
>> Fixes: 194b482b5055 ("wil6210: Debug print GRO Rx result")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> Reviewed-by: Maya Erez <merez@codeaurora.org>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> Patch applied to ath-next branch of ath.git, thanks.
>
> bfabdd699732 wil6210: fix potential out-of-bounds read
>
Awesome. :)
Thanks, Kalle.
--
Gustavo
prev parent reply other threads:[~2019-04-29 15:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 14:56 [PATCH] wil6210: fix potential out-of-bounds read Gustavo A. R. Silva
2019-04-15 17:24 ` merez
2019-04-15 17:29 ` Gustavo A. R. Silva
2019-04-29 15:00 ` Kalle Valo
[not found] ` <20190429150007.69D8E60741@smtp.codeaurora.org>
2019-04-29 15:23 ` Gustavo A. R. Silva [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=579ff8c6-7178-e409-6bc6-bde8ceae581a@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=davem@davemloft.net \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=merez@codeaurora.org \
--cc=netdev@vger.kernel.org \
--cc=qca_vkondrat@qca.qualcomm.com \
--cc=wil6210@qti.qualcomm.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).