mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: xu.xin16@zte.com.cn
Cc: kees@kernel.org, concord@gentoo.org,
	linux-wireless@vger.kernel.org,  linux-kernel@vger.kernel.org,
	qiu.yutan@zte.com.cn
Subject: Re: wifi: mac80211: make n_channels updated absolutely before accessing channels[]
Date: Wed, 12 Nov 2025 09:41:04 +0100	[thread overview]
Message-ID: <494afbf2ca5b18f230b02b03f122c4d427dd08ee.camel@sipsolutions.net> (raw)
In-Reply-To: <20251112163750463kAkOIyBxvHkYWh9Cgdypb@zte.com.cn>

On Wed, 2025-11-12 at 16:37 +0800, xu.xin16@zte.com.cn wrote:
> From: xu xin <xu.xin16@zte.com.cn>
> 
> The commit 2663d0462eb3 ("wifi: mac80211: Avoid address calculations via out of
> bounds array indexing") said that req->n_channels must be set before
> req->channels[] can be used. But there&apos;s still the case that req.channels
> accessing was prior to n_channels++.
> 
> This does not fix any visible bug, just making n_channels updated before
> accessing channels[] absolutely, to avoid potential UBSAN out of indexing
> warning.

I reverted the annotations, so this isn't necessary.

johannes

  reply	other threads:[~2025-11-12  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12  8:37 xu.xin16
2025-11-12  8:41 ` Johannes Berg [this message]
2025-11-12  8:50   ` xu.xin16
2025-11-12 12:13     ` Johannes Berg

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=494afbf2ca5b18f230b02b03f122c4d427dd08ee.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=concord@gentoo.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=qiu.yutan@zte.com.cn \
    --cc=xu.xin16@zte.com.cn \
    /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®