<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211/scan.c, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-07-27T08:40:17Z</updated>
<entry>
<title>wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()</title>
<updated>2024-07-27T08:40:17Z</updated>
<author>
<name>Dmitry Antipov</name>
</author>
<published>2024-05-17T15:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb8ace6794a1bc50eee92adc67a4857a3e8c81d7'/>
<id>urn:sha1:bb8ace6794a1bc50eee92adc67a4857a3e8c81d7</id>
<content type='text'>
[ Upstream commit 92ecbb3ac6f3fe8ae9edf3226c76aa17b6800699 ]

When testing the previous patch with CONFIG_UBSAN_BOUNDS, I've
noticed the following:

UBSAN: array-index-out-of-bounds in net/mac80211/scan.c:372:4
index 0 is out of range for type 'struct ieee80211_channel *[]'
CPU: 0 PID: 1435 Comm: wpa_supplicant Not tainted 6.9.0+ #1
Hardware name: LENOVO 20UN005QRT/20UN005QRT &lt;...BIOS details...&gt;
Call Trace:
 &lt;TASK&gt;
 dump_stack_lvl+0x2d/0x90
 __ubsan_handle_out_of_bounds+0xe7/0x140
 ? timerqueue_add+0x98/0xb0
 ieee80211_prep_hw_scan+0x2db/0x480 [mac80211]
 ? __kmalloc+0xe1/0x470
 __ieee80211_start_scan+0x541/0x760 [mac80211]
 rdev_scan+0x1f/0xe0 [cfg80211]
 nl80211_trigger_scan+0x9b6/0xae0 [cfg80211]
 ...&lt;the rest is not too useful...&gt;

Since '__ieee80211_start_scan()' leaves 'hw_scan_req-&gt;req.n_channels'
uninitialized, actual boundaries of 'hw_scan_req-&gt;req.channels' can't
be checked in 'ieee80211_prep_hw_scan()'. Although an initialization
of 'hw_scan_req-&gt;req.n_channels' introduces some confusion around
allocated vs. used VLA members, this shouldn't be a problem since
everything is correctly adjusted soon in 'ieee80211_prep_hw_scan()'.

Cleanup 'kmalloc()' math in '__ieee80211_start_scan()' by using the
convenient 'struct_size()' as well.

Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Link: https://msgid.link/20240517153332.18271-2-dmantipov@yandex.ru
[improve (imho) indentation a bit]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: fix MBSSID parsing use-after-free</title>
<updated>2022-10-17T15:26:07Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2022-10-14T16:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=31ce5da48a845bac48930bbde1d45e7449591728'/>
<id>urn:sha1:31ce5da48a845bac48930bbde1d45e7449591728</id>
<content type='text'>
Commit ff05d4b45dd89b922578dac497dcabf57cf771c6 upstream.
This is a different version of the commit, changed to store
the non-transmitted profile in the elems, and freeing it in
the few places where it's relevant, since that is only the
case when the last argument for parsing (the non-tx BSSID)
is non-NULL.

When we parse a multi-BSSID element, we might point some
element pointers into the allocated nontransmitted_profile.
However, we free this before returning, causing UAF when the
relevant pointers in the parsed elements are accessed.

Fix this by not allocating the scratch buffer separately but
as part of the returned structure instead, that way, there
are no lifetime issues with it.

The scratch buffer introduction as part of the returned data
here is taken from MLO feature work done by Ilan.

This fixes CVE-2022-42719.

Fixes: 5023b14cf4df ("mac80211: support profile split between elements")
Co-developed-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: Fix UAF in ieee80211_scan_rx()</title>
<updated>2022-09-08T09:11:40Z</updated>
<author>
<name>Siddh Raman Pant</name>
</author>
<published>2022-08-19T20:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4abc8c07a065ecf771827bde3c63fbbe4aa0c08b'/>
<id>urn:sha1:4abc8c07a065ecf771827bde3c63fbbe4aa0c08b</id>
<content type='text'>
commit 60deb9f10eec5c6a20252ed36238b55d8b614a2c upstream.

ieee80211_scan_rx() tries to access scan_req-&gt;flags after a
null check, but a UAF is observed when the scan is completed
and __ieee80211_scan_completed() executes, which then calls
cfg80211_scan_done() leading to the freeing of scan_req.

Since scan_req is rcu_dereference()'d, prevent the racing in
__ieee80211_scan_completed() by ensuring that from mac80211's
POV it is no longer accessed from an RCU read critical section
before we call cfg80211_scan_done().

Cc: stable@vger.kernel.org
Link: https://syzkaller.appspot.com/bug?extid=f9acff9bf08a845f225d
Reported-by: syzbot+f9acff9bf08a845f225d@syzkaller.appspotmail.com
Suggested-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Siddh Raman Pant &lt;code@siddh.me&gt;
Link: https://lore.kernel.org/r/20220819200340.34826-1-code@siddh.me
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mac80211: upgrade passive scan to active scan on DFS channels after beacon rx</title>
<updated>2022-06-09T08:21:26Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2022-04-20T10:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=873069e393c5e56a95a98b799e69184a85fa6cf6'/>
<id>urn:sha1:873069e393c5e56a95a98b799e69184a85fa6cf6</id>
<content type='text'>
commit b041b7b9de6e1d4362de855ab90f9d03ef323edd upstream.

In client mode, we can't connect to hidden SSID APs or SSIDs not advertised
in beacons on DFS channels, since we're forced to passive scan. Fix this by
sending out a probe request immediately after the first beacon, if active
scan was requested by the user.

Cc: stable@vger.kernel.org
Reported-by: Catrinel Catrinescu &lt;cc@80211.de&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Link: https://lore.kernel.org/r/20220420104907.36275-1-nbd@nbd.name
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mac80211: fix skb length check in ieee80211_scan_rx()</title>
<updated>2021-06-23T12:42:41Z</updated>
<author>
<name>Du Cheng</name>
</author>
<published>2021-05-10T04:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a1cd67a801cf5ef989c4783e07b86a25b143126'/>
<id>urn:sha1:5a1cd67a801cf5ef989c4783e07b86a25b143126</id>
<content type='text'>
[ Upstream commit e298aa358f0ca658406d524b6639fe389cb6e11e ]

Replace hard-coded compile-time constants for header length check
with dynamic determination based on the frame type. Otherwise, we
hit a validation WARN_ON in cfg80211 later.

Fixes: cd418ba63f0c ("mac80211: convert S1G beacon to scan results")
Reported-by: syzbot+405843667e93b9790fc1@syzkaller.appspotmail.com
Signed-off-by: Du Cheng &lt;ducheng2@gmail.com&gt;
Link: https://lore.kernel.org/r/20210510041649.589754-1-ducheng2@gmail.com
[style fixes, reword commit message]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mac80211: convert S1G beacon to scan results</title>
<updated>2020-09-28T11:53:25Z</updated>
<author>
<name>Thomas Pedersen</name>
</author>
<published>2020-09-22T02:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd418ba63f0c2f6157f35a41c9accc6ecb52590a'/>
<id>urn:sha1:cd418ba63f0c2f6157f35a41c9accc6ecb52590a</id>
<content type='text'>
This commit finds the correct offset for Information
Elements in S1G beacon frames so they can be reported in
scan results.

Signed-off-by: Thomas Pedersen &lt;thomas@adapt-ip.com&gt;
Link: https://lore.kernel.org/r/20200922022818.15855-8-thomas@adapt-ip.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: s1g: choose scanning width based on frequency</title>
<updated>2020-09-28T11:53:05Z</updated>
<author>
<name>Thomas Pedersen</name>
</author>
<published>2020-09-22T02:28:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75b1593533f13a2b77306a1edb971be2d8705dd7'/>
<id>urn:sha1:75b1593533f13a2b77306a1edb971be2d8705dd7</id>
<content type='text'>
An S1G BSS can beacon at either 1 or 2 MHz and the channel
width is unique to a given frequency. Ignore scan channel
width for now and use the allowed channel width.

Signed-off-by: Thomas Pedersen &lt;thomas@adapt-ip.com&gt;
Link: https://lore.kernel.org/r/20200922022818.15855-3-thomas@adapt-ip.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>nl80211/cfg80211: support 6 GHz scanning</title>
<updated>2020-09-28T11:53:04Z</updated>
<author>
<name>Tova Mussai</name>
</author>
<published>2020-09-18T09:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8cb5b854b40f2ce52ccd032fa19750f4181d5fc'/>
<id>urn:sha1:c8cb5b854b40f2ce52ccd032fa19750f4181d5fc</id>
<content type='text'>
Support 6 GHz scanning, by
 * a new scan flag to scan for colocated BSSes advertised
   by (and found) APs on 2.4 &amp; 5 GHz
 * doing the necessary reduced neighbor report parsing for
   this, to find them
 * adding the ability to split the scan request in case the
   device by itself cannot support this.

Also add some necessary bits in mac80211 to not break with
these changes.

Signed-off-by: Tova Mussai &lt;tova.mussai@intel.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Link: https://lore.kernel.org/r/20200918113313.232917c93af9.Ida22f0212f9122f47094d81659e879a50434a6a2@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: remove unused flags argument in transmit functions</title>
<updated>2020-07-31T07:27:01Z</updated>
<author>
<name>Mathy Vanhoef</name>
</author>
<published>2020-07-23T10:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08aca29aa8b18dec2e84bc97d27dabe133b75822'/>
<id>urn:sha1:08aca29aa8b18dec2e84bc97d27dabe133b75822</id>
<content type='text'>
The flags argument in transmit functions is no longer being used
and can be removed.

Signed-off-by: Mathy Vanhoef &lt;Mathy.Vanhoef@kuleuven.be&gt;
Link: https://lore.kernel.org/r/20200723100153.31631-5-Mathy.Vanhoef@kuleuven.be
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: use same flag everywhere to avoid sequence number overwrite</title>
<updated>2020-07-31T07:27:01Z</updated>
<author>
<name>Mathy Vanhoef</name>
</author>
<published>2020-07-23T10:01:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b3dab1353209256cb3d7e07f14584eac8c82508'/>
<id>urn:sha1:2b3dab1353209256cb3d7e07f14584eac8c82508</id>
<content type='text'>
Use the IEEE80211_TX_CTRL_NO_SEQNO flag in ieee80211_tx_info to mark
probe requests whose sequence number must not be overwritten. This
provides consistency with the radiotap flag that can be set to indicate
that the sequence number of an injected frame should not be overwritten.

Signed-off-by: Mathy Vanhoef &lt;Mathy.Vanhoef@kuleuven.be&gt;
Link: https://lore.kernel.org/r/20200723100153.31631-4-Mathy.Vanhoef@kuleuven.be
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
