mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: merez@codeaurora.org
Cc: Kalle Valo <kvalo@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,
	linux-wireless-owner@vger.kernel.org
Subject: Re: [PATCH] wil6210: fix potential out-of-bounds read
Date: Mon, 15 Apr 2019 12:29:46 -0500	[thread overview]
Message-ID: <2062ed93-5729-cb58-7708-9bde957c5ff0@embeddedor.com> (raw)
In-Reply-To: <514f4e102c3cbbd59f4ba0805b091b36@codeaurora.org>



On 4/15/19 12:24 PM, merez@codeaurora.org wrote:
> On 2019-04-15 17:56, Gustavo A. R. Silva 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>
>> ---
>>  drivers/net/wireless/ath/wil6210/txrx.c | 1 +
>>  1 file changed, 1 insertion(+)
> 
> Reviewed-by: Maya Erez <merez@codeaurora.org>
> 

Thanks, Maya.
--
Gustavo

  reply	other threads:[~2019-04-15 17:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 14:56 Gustavo A. R. Silva
2019-04-15 17:24 ` merez
2019-04-15 17:29   ` Gustavo A. R. Silva [this message]
2019-04-29 15:00 ` Kalle Valo
     [not found] ` <20190429150007.69D8E60741@smtp.codeaurora.org>
2019-04-29 15:23   ` Gustavo A. R. Silva

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=2062ed93-5729-cb58-7708-9bde957c5ff0@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=davem@davemloft.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless-owner@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

all inboxes | Powered by JetHome®