Messages in this thread | | | Subject | Re: [PATCH v3] wifi: mwifiex: Refactor 1-element array into flexible array in struct mwifiex_ie_types_chan_list_param_set | From | Kalle Valo <> | Date | Mon, 12 Feb 2024 15:38:08 +0000 (UTC) |
| |
Kees Cook <keescook@chromium.org> wrote:
> struct mwifiex_ie_types_chan_list_param_set::chan_scan_param is treated > as a flexible array, so convert it into one so that it doesn't trip > the array bounds sanitizer[1]. Only a few places were using sizeof() > on the whole struct, so adjust those to follow the calculation pattern > to avoid including the trailing single element. > > Examining binary output differences doesn't appear to show any literal > size values changing, though it is obfuscated a bit by the compiler > adjusting register usage and stack spill slots, etc. > > Link: https://github.com/KSPP/linux/issues/51 [1] > Cc: Brian Norris <briannorris@chromium.org> > Cc: Kalle Valo <kvalo@kernel.org> > Cc: Dmitry Antipov <dmantipov@yandex.ru> > Cc: Johannes Berg <johannes.berg@intel.com> > Cc: zuoqilin <zuoqilin@yulong.com> > Cc: Ruan Jinjie <ruanjinjie@huawei.com> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > Cc: Gustavo A. R. Silva <gustavoars@kernel.org> > Cc: linux-wireless@vger.kernel.org > Signed-off-by: Kees Cook <keescook@chromium.org> > Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Patch applied to wireless-next.git, thanks.
14ddc470ba22 wifi: mwifiex: Refactor 1-element array into flexible array in struct mwifiex_ie_types_chan_list_param_set
-- https://patchwork.kernel.org/project/linux-wireless/patch/20240207103024.make.423-kees@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
| |