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: <86bbb07755d748c9b582c0ab234e8a4ce0314ce4.camel@sipsolutions.net>
Date: Tue, 17 Jun 2025 08:31:27 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Edward Adam Davis <eadavis@...com>, 
	syzbot+6554b492c7008bcd3385@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org, 
	netdev@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] wifi: mac80211: fix oob in ieee80211_rx_mgmt_beacon

On Tue, 2025-06-17 at 12:41 +0800, Edward Adam Davis wrote:
> According to ieee80211_s1g_optional_len(), it can be clearly seen that the
> maximum size of variable is 4 and it is an array. Based on the above, the
> parsing of the frame control field and optional field is optimized.
> 
> Fixes: 1e1f706fc2ce ("wifi: cfg80211/mac80211: correctly parse S1G beacon optional elements")
> Reported-by: syzbot+6554b492c7008bcd3385@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=6554b492c7008bcd3385
> Tested-by: syzbot+6554b492c7008bcd3385@...kaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@...com>
> ---
>  include/linux/ieee80211.h | 2 +-
>  net/mac80211/mlme.c       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
> index ce377f7fb912..556ce95e0b0f 100644
> --- a/include/linux/ieee80211.h
> +++ b/include/linux/ieee80211.h
> @@ -1278,7 +1278,7 @@ struct ieee80211_ext {
>  			u8 sa[ETH_ALEN];
>  			__le32 timestamp;
>  			u8 change_seq;
> -			u8 variable[0];
> +			u8 variable[4];

That's incorrect when those fields aren't present, and will result in
wrong sizeof(). I believe the correct fix is one I sent before, to just
make it []:

https://lore.kernel.org/linux-wireless/20250614003037.a3e82e882251.I2e8b58e56ff2a9f8b06c66f036578b7c1d4e4685@changeid/

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ