]> www.infradead.org Git - nvme.git/commit
wifi: cfg80211: correct S1G beacon length calculation
authorJohannes Berg <johannes.berg@intel.com>
Wed, 24 Jul 2024 11:29:12 +0000 (13:29 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 26 Jul 2024 10:32:47 +0000 (12:32 +0200)
commit6873cc4416078202882691b424fcca5b5fb1a94d
treebce6aab46a16dbf1cc9856898b7bf3d395681926
parentbaeaabf970b9a90999f62ae27edf63f6cb86c023
wifi: cfg80211: correct S1G beacon length calculation

The minimum header length calculation (equivalent to the start
of the elements) for the S1G long beacon erroneously required
only up to the start of u.s1g_beacon rather than the start of
u.s1g_beacon.variable. Fix that, and also shuffle the branches
around a bit to not assign useless values that are overwritten
later.

Reported-by: syzbot+0f3afa93b91202f21939@syzkaller.appspotmail.com
Fixes: 9eaffe5078ca ("cfg80211: convert S1G beacon to scan results")
Link: https://patch.msgid.link/20240724132912.9662972db7c1.I8779675b5bbda4994cc66f876b6b87a2361c3c0b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c