<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211/scan.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-07-25T07:53:29Z</updated>
<entry>
<title>wifi: mac80211: Avoid address calculations via out of bounds array indexing</title>
<updated>2024-07-25T07:53:29Z</updated>
<author>
<name>Kenton Groombridge</name>
</author>
<published>2024-06-05T15:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f43a614b1b84f0d1e3c48cc541c3bfdf414a6d0'/>
<id>urn:sha1:4f43a614b1b84f0d1e3c48cc541c3bfdf414a6d0</id>
<content type='text'>
[ Upstream commit 2663d0462eb32ae7c9b035300ab6b1523886c718 ]

req-&gt;n_channels must be set before req-&gt;channels[] can be used.

This patch fixes one of the issues encountered in [1].

[   83.964255] UBSAN: array-index-out-of-bounds in net/mac80211/scan.c:364:4
[   83.964258] index 0 is out of range for type 'struct ieee80211_channel *[]'
[...]
[   83.964264] Call Trace:
[   83.964267]  &lt;TASK&gt;
[   83.964269]  dump_stack_lvl+0x3f/0xc0
[   83.964274]  __ubsan_handle_out_of_bounds+0xec/0x110
[   83.964278]  ieee80211_prep_hw_scan+0x2db/0x4b0
[   83.964281]  __ieee80211_start_scan+0x601/0x990
[   83.964291]  nl80211_trigger_scan+0x874/0x980
[   83.964295]  genl_family_rcv_msg_doit+0xe8/0x160
[   83.964298]  genl_rcv_msg+0x240/0x270
[...]

[1] https://bugzilla.kernel.org/show_bug.cgi?id=218810

Co-authored-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Kenton Groombridge &lt;concord@gentoo.org&gt;
Link: https://msgid.link/20240605152218.236061-1-concord@gentoo.org
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 UBSAN noise in ieee80211_prep_hw_scan()</title>
<updated>2024-07-25T07:53:22Z</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=08e4496bdb1946ed28a91e35de3e881451c16b75'/>
<id>urn:sha1:08e4496bdb1946ed28a91e35de3e881451c16b75</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: don't select link ID if not provided in scan request</title>
<updated>2024-05-30T07:44:12Z</updated>
<author>
<name>Ayala Beker</name>
</author>
<published>2024-03-20T07:14:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9802144efb6b033316b00246c978c92e8cf43c2'/>
<id>urn:sha1:d9802144efb6b033316b00246c978c92e8cf43c2</id>
<content type='text'>
[ Upstream commit 80b0aacd1ad046b46d471cf8ed6203bbd777f988 ]

If scan request doesn't include a link ID to be used for TSF
reporting, don't select it as it might become inactive before
scan is actually started by the driver.
Instead, let the driver select one of the active links.

Fixes: cbde0b49f276 ("wifi: mac80211: Extend support for scanning while MLO connected")
Signed-off-by: Ayala Beker &lt;ayala.beker@intel.com&gt;
Reviewed-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Miri Korenblit &lt;miriam.rachel.korenblit@intel.com&gt;
Link: https://msgid.link/20240320091155.a6b643a15755.Ic28ed9a611432387b7f85e9ca9a97a4ce34a6e0f@changeid
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: don't use rate mask for scanning</title>
<updated>2024-04-08T18:11:34Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2024-03-26T21:08:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab9177d83c040eba58387914077ebca56f14fae6'/>
<id>urn:sha1:ab9177d83c040eba58387914077ebca56f14fae6</id>
<content type='text'>
The rate mask is intended for use during operation, and
can be set to only have masks for the currently active
band. As such, it cannot be used for scanning which can
be on other bands as well.

Simply ignore the rate masks during scanning to avoid
warnings from incorrect settings.

Reported-by: syzbot+fdc5123366fb9c3fdc6d@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=fdc5123366fb9c3fdc6d
Co-developed-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Tested-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Link: https://msgid.link/20240326220854.9594cbb418ca.I7f86c0ba1f98cf7e27c2bacf6c2d417200ecea5c@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: Allow beacons to update BSS table regardless of scan</title>
<updated>2024-03-04T13:31:40Z</updated>
<author>
<name>Ilan Peer</name>
</author>
<published>2024-02-28T08:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ddf82e752f8a3253e03fe4c0a957792701f8b2e6'/>
<id>urn:sha1:ddf82e752f8a3253e03fe4c0a957792701f8b2e6</id>
<content type='text'>
When a beacon is received use it to update the BSS table regardless
of the scanning state. Do so only when there are active non-monitor
interfaces. Also, while at it, in any case accept beacons only with
broadcast address.

Reviewed-by: Miriam Rachel Korenblit &lt;miriam.rachel.korenblit@intel.com&gt;
Signed-off-by: Ilan Peer &lt;ilan.peer@intel.com&gt;
Link: https://msgid.link/20240228094742.e508605f495b.I3ab24ab3543319e31165111b28bcdcc622b5cf02@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: start building elements in SKBs</title>
<updated>2024-02-08T14:00:43Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2024-01-29T19:19:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07095d167749d49de876613b3567a246d86135a1'/>
<id>urn:sha1:07095d167749d49de876613b3567a246d86135a1</id>
<content type='text'>
The building of elements is really mess, and really the only
reason we're not doing it in SKBs in the first place is that
the scan code in ieee80211_build_preq_ies() doesn't.

Convert ieee80211_build_preq_ies() to use an SKB internally
so that we can gradually convert other things to ..._put_*()
style interfaces.

Link: https://msgid.link/20240129202041.c3a8e3c2cc99.I9d9920858c30ae5154719783933de0d7bc2a2cb9@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: simplify non-chanctx drivers</title>
<updated>2024-02-08T11:58:32Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2024-01-29T18:34:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a44dfc070749514b804ccac0b1fd38718f7daa1'/>
<id>urn:sha1:0a44dfc070749514b804ccac0b1fd38718f7daa1</id>
<content type='text'>
There are still surprisingly many non-chanctx drivers, but in
mac80211 that code is a bit awkward. Simplify this by having
those drivers assign 'emulated' ops, so that the mac80211 code
can be more unified between non-chanctx/chanctx drivers. This
cuts the number of places caring about it by about 15, which
are scattered across - now they're fewer and no longer in the
channel context handling.

Link: https://msgid.link/20240129194108.6d0ead50f5cf.I60d093b2fc81ca1853925a4d0ac3a2337d5baa5b@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge wireless into wireless-next</title>
<updated>2024-02-08T08:58:25Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2024-02-08T08:57:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af4acac7caa17cf10742c80e2dd859e21d06abb9'/>
<id>urn:sha1:af4acac7caa17cf10742c80e2dd859e21d06abb9</id>
<content type='text'>
There are some changes coming to wireless-next that will
otherwise cause conflicts, pull wireless in first to be
able to resolve that when applying the individual changes
rather than having to do merge resolution later.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: accept broadcast probe responses on 6 GHz</title>
<updated>2024-02-02T12:11:59Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2024-01-29T19:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62a6183c13319e4d2227473a04abd104c4f56dcf'/>
<id>urn:sha1:62a6183c13319e4d2227473a04abd104c4f56dcf</id>
<content type='text'>
On the 6 GHz band, probe responses are sent as broadcast to
optimise medium usage. However, without OCE configuration
we weren't accepting them, which is wrong, even if wpa_s is
by default enabling OCE. Accept them without the OCE config
as well.

Link: https://msgid.link/20240129200907.5a89c2821897.I92e9dfa0f9b350bc7f37dd4bb38031d156d78d8a@changeid
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: mac80211: apply duration for SW scan</title>
<updated>2024-01-26T08:40:42Z</updated>
<author>
<name>Michael-CY Lee</name>
</author>
<published>2024-01-23T05:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d60277ac3fc9c9f7887ff813c98d0a71ac2abde2'/>
<id>urn:sha1:d60277ac3fc9c9f7887ff813c98d0a71ac2abde2</id>
<content type='text'>
This patch makes duration in scan request be applicable when using
SW scan, but only accepts durations greater than the default value for
the following reasons:
1. Most APs have a beacoon interval of 100ms.
2. Sending and receiving probe require some delay.
3. Setting channel to HW also requires some delays

Signed-off-by: Michael-CY Lee &lt;michael-cy.lee@mediatek.com&gt;
Link: https://msgid.link/20240123054752.22833-1-michael-cy.lee@mediatek.com
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
