Linux Hardening
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Kenton Groombridge <concord@gentoo.org>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com,  linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v2] wifi: mac80211: Avoid address calculations via out of bounds array indexing
Date: Tue, 04 Jun 2024 21:29:57 +0200	[thread overview]
Message-ID: <ab59089feac4cfbc1d681fcaa4a828ca13088ce1.camel@sipsolutions.net> (raw)
In-Reply-To: <cx2oet5b5lavjywcbf7u4c32krtoglvt3xbe2sxac55e36iibw@lrd5iuhtxz2g>

On Tue, 2024-06-04 at 14:53 -0400, Kenton Groombridge wrote:
> On 24/05/29 04:54PM, Johannes Berg wrote:
> > On Fri, 2024-05-17 at 10:54 -0400, Kenton Groombridge wrote:
> > > req->n_channels must be set before req->channels[] can be used.
> > > 
> > 
> > I don't know why, but this patch breaks a number of hwsim test cases.
> > 
> > https://w1.fi/cgit/hostap/tree/tests/hwsim/
> > 
> > johannes
> 
> Pardon my absence.
> 
> I'm also not sure why these tests are failing. Unless I'm missing
> something, the runtime behavior of these code paths shouldn't have
> changed significantly.
> 

Looking at your patch again, this seems wrong?

> +				local->hw_scan_req->req.channels[*n_chans++] =
>  							req->channels[i];
> 

This will increment n_chans rather than *n_chans, no?

johannes

  reply	other threads:[~2024-06-04 19:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-17 14:54 [PATCH v2] wifi: mac80211: Avoid address calculations via out of bounds array indexing Kenton Groombridge
2024-05-17 20:45 ` Simon Horman
2024-05-23  9:35   ` Johannes Berg
2024-05-31 13:24     ` Simon Horman
2024-05-29 14:54 ` Johannes Berg
2024-06-04 18:53   ` Kenton Groombridge
2024-06-04 19:29     ` Johannes Berg [this message]
2024-06-05 14:52       ` Kenton Groombridge
2024-06-03  7:20 ` kernel test robot

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=ab59089feac4cfbc1d681fcaa4a828ca13088ce1.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=concord@gentoo.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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