[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202411170303.1F0B0E2@keescook>
Date: Sun, 17 Nov 2024 03:04:37 -0800
From: Kees Cook <kees@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: "Gustavo A. R. Silva" <gustavo@...eddedor.com>, benjamin.berg@...el.com,
dmantipov@...dex.ru, gregory.greenman@...el.com,
gustavoars@...nel.org, haim.dreyfuss@...el.com,
johannes.berg@...el.com, kvalo@...nel.org,
linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-wireless@...r.kernel.org, luciano.coelho@...el.com,
miriam.rachel.korenblit@...el.com, shaul.triebitz@...el.com,
yedidya.ben.shimol@...el.com
Subject: Re: [PATCH] wifi: iwlwifi: mvm: Fix __counted_by usage in
cfg80211_wowlan_nd_*
On Thu, Jun 20, 2024 at 08:53:45PM +0200, Christophe JAILLET wrote:
> Le 20/06/2024 à 20:08, Gustavo A. R. Silva a écrit :
> >
> >
> > On 6/20/24 12:02, Gustavo A. R. Silva wrote:
> > >
> > > > My understanding is that 'match', is allocated by :
> > > > match = kzalloc(struct_size(match, channels, n_channels),
> > > > GFP_KERNEL);
> > > >
> > > > So match->n_channels is *0* when iwl_mvm_query_set_freqs() is called.
> > >
> > > n_channels is updated in the line before calling kzalloc():
> > >
> > > n_channels = iwl_mvm_query_num_match_chans(mvm, d3_data->nd_results, i);
> > >
> > > match = kzalloc(struct_size(match, channels, n_channels), GFP_KERNEL);
> >
> > then match->n_channels updated here:
> >
> > if (!match)
> > goto out_report_nd;
> > + match->n_channels = n_channels;
>
> Thanks for the explanation.
> This is what I was looking for, and I missed this line.
>
> Sorry for the noise.
Hi,
This patch is still needed and doesn't appear in -next (nor Linus's
tree). Should I resend it?
Thanks!
-Kees
--
Kees Cook
Powered by blists - more mailing lists