lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c48b4529bf552d5c16b4dcc951c653f37b6a68e.camel@sipsolutions.net>
Date: Fri, 25 Oct 2024 22:25:40 +0200
From: Johannes Berg <johannes@...solutions.net>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>, "Gustavo A. R. Silva"
	 <gustavoars@...nel.org>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-hardening@...r.kernel.org, Aditya Kumar Singh <quic_adisi@...cinc.com>
Subject: Re: [PATCH][next] wifi: mac80211: ieee80211_i: Avoid dozens of
 -Wflex-array-member-not-at-end warnings

On Fri, 2024-10-25 at 14:22 -0600, Gustavo A. R. Silva wrote:
> 
> > > -	struct ieee80211_chanctx_conf conf;
> > > -
> > >   	bool radar_detected;
> > > +
> > > +	/* MUST be last - ends in a flexible-array member. */
> > > +	struct ieee80211_chanctx_conf conf;
> > >   };
> > 
> > Oi. That's not just a warnings problem, that's actually a pretty stupid
> > bug, this will surely get used and radar_detected will alias stuff that
> > the driver puts there - at least for drivers using chanctx_data_size,
> > which is a couple: ath9k, iwlmvm, mt792x, rwt89 and hwsim.
> > 
> > Could you resend with a description that this is a bugfix and
> > 
> > Fixes: bca8bc0399ac ("wifi: mac80211: handle ieee80211_radar_detected() for MLO")
> 
> Yeah, I was actually going to mention this commit, as it's the one that introduced
> that `bool radar_detected` to the flex struct. However, it wasn't obvious to me
> how `struct ieee80211_chanctx_conf conf` could overwrite `radar_detected` as I didn't
> see `conf->drv_priv` being accessed through `struct struct ieee80211_chanctx_conf`.

You have to look at the drivers, see hwsim_clear_chanctx_magic() for
example; I wonder why hwsim_check_chanctx_magic() never caught this.

> > please? Or I can do it myself I guess, but ...
> 
> Sure thing. I can CC stable as well.

Thanks!

No need for stable, it got introduced in 6.12-rc1 only.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ