public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: coverity-bot <keescook@chromium.org>
To: Ajay Singh <ajay.kathat@microchip.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	linux-next@vger.kernel.org
Subject: Coverity: wilc_parse_join_bss_param(): Memory - illegal accesses
Date: Mon, 4 Nov 2019 09:38:48 -0800	[thread overview]
Message-ID: <201911040938.57CCE1B@keescook> (raw)

Hello!

This is an experimental automated report about issues detected by Coverity
from a scan of next-20191031 as part of the linux-next weekly scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by recent commits:

4e0b0f42c9c7 ("staging: wilc1000: use struct to pack join parameters for FW")

Coverity reported the following:

*** CID 1487400:  Memory - illegal accesses  (OVERRUN)
/drivers/staging/wilc1000/wilc_hif.c: 496 in wilc_parse_join_bss_param()
490     	if (supp_rates_ie) {
491     		if (supp_rates_ie[1] > (WILC_MAX_RATES_SUPPORTED - rates_len))
492     			param->supp_rates[0] = WILC_MAX_RATES_SUPPORTED;
493     		else
494     			param->supp_rates[0] += supp_rates_ie[1];
495
vvv     CID 1487400:  Memory - illegal accesses  (OVERRUN)
vvv     Overrunning array of 13 bytes at byte offset 13 by dereferencing pointer "&param->supp_rates[rates_len + 1]". [Note: The source code implementation of the function has been overridden by a builtin model.]
496     		memcpy(&param->supp_rates[rates_len + 1], supp_rates_ie + 2,
497     		       (param->supp_rates[0] - rates_len));
498     	}
499
500     	ht_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, ies->data, ies->len);
501     	if (ht_ie)

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1487400 ("Memory - illegal accesses")
Fixes: 4e0b0f42c9c7 ("staging: wilc1000: use struct to pack join parameters for FW")


Thanks for your attention!

-- 
Coverity-bot

             reply	other threads:[~2019-11-04 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 17:38 coverity-bot [this message]
2019-11-05  6:11 ` Coverity: wilc_parse_join_bss_param(): Memory - illegal accesses Ajay.Kathat
2019-11-05 17:12   ` Kees Cook
2019-11-06  5:13     ` Ajay.Kathat

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=201911040938.57CCE1B@keescook \
    --to=keescook@chromium.org \
    --cc=ajay.kathat@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=linux-next@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