<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/net/wireless, branch v6.1.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.1.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.1.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2022-12-31T12:32:20Z</updated>
<entry>
<title>wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails</title>
<updated>2022-12-31T12:32:20Z</updated>
<author>
<name>Chen Zhongjin</name>
<email>chenzhongjin@huawei.com</email>
</author>
<published>2022-11-09T09:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ae99debcf6b8676af542cc3cb199ae6377ccbd14'/>
<id>urn:sha1:ae99debcf6b8676af542cc3cb199ae6377ccbd14</id>
<content type='text'>
[ Upstream commit 833a9fd28c9b7ccb39a334721379e992dc1c0c89 ]

In regulatory_init_db(), when it's going to return a error, reg_pdev
should be unregistered. When load_builtin_regdb_keys() fails it doesn't
do it and makes cfg80211 can't be reload with report:

sysfs: cannot create duplicate filename '/devices/platform/regulatory.0'
 ...
 &lt;TASK&gt;
 dump_stack_lvl+0x79/0x9b
 sysfs_warn_dup.cold+0x1c/0x29
 sysfs_create_dir_ns+0x22d/0x290
 kobject_add_internal+0x247/0x800
 kobject_add+0x135/0x1b0
 device_add+0x389/0x1be0
 platform_device_add+0x28f/0x790
 platform_device_register_full+0x376/0x4b0
 regulatory_init+0x9a/0x4b2 [cfg80211]
 cfg80211_init+0x84/0x113 [cfg80211]
 ...

Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking")
Signed-off-by: Chen Zhongjin &lt;chenzhongjin@huawei.com&gt;
Link: https://lore.kernel.org/r/20221109090237.214127-1-chenzhongjin@huawei.com
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: nl80211: Add checks for nla_nest_start() in nl80211_send_iface()</title>
<updated>2022-12-31T12:32:20Z</updated>
<author>
<name>Yuan Can</name>
<email>yuancan@huawei.com</email>
</author>
<published>2022-11-29T01:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=687b6b37c09481a39ec60cfa94e7049daeb1af2f'/>
<id>urn:sha1:687b6b37c09481a39ec60cfa94e7049daeb1af2f</id>
<content type='text'>
[ Upstream commit 5cc58b376675981386c6192405fe887cd29c527a ]

As the nla_nest_start() may fail with NULL returned, the return value needs
to be checked.

Fixes: ce08cd344a00 ("wifi: nl80211: expose link information for interfaces")
Signed-off-by: Yuan Can &lt;yuancan@huawei.com&gt;
Link: https://lore.kernel.org/r/20221129014211.56558-1-yuancan@huawei.com
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: cfg80211: don't allow multi-BSSID in S1G</title>
<updated>2022-11-25T11:43:14Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2022-11-25T11:36:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=acd3c92acc7aaec50a94d0a7faf7ccd74e952493'/>
<id>urn:sha1:acd3c92acc7aaec50a94d0a7faf7ccd74e952493</id>
<content type='text'>
In S1G beacon frames there shouldn't be multi-BSSID elements
since that's not supported, remove that to avoid a potential
integer underflow and/or misparsing the frames due to the
different length of the fixed part of the frame.

While at it, initialize non_tx_data so we don't send garbage
values to the user (even if it doesn't seem to matter now.)

Reported-and-tested-by: Sönke Huster &lt;shuster@seemoo.tu-darmstadt.de&gt;
Fixes: 9eaffe5078ca ("cfg80211: convert S1G beacon to scan results")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: cfg80211: fix buffer overflow in elem comparison</title>
<updated>2022-11-25T11:43:05Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2022-11-25T11:36:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f16b5c82a025cd4c864737409234ddc44fb166a'/>
<id>urn:sha1:9f16b5c82a025cd4c864737409234ddc44fb166a</id>
<content type='text'>
For vendor elements, the code here assumes that 5 octets
are present without checking. Since the element itself is
already checked to fit, we only need to check the length.

Reported-and-tested-by: Sönke Huster &lt;shuster@seemoo.tu-darmstadt.de&gt;
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: cfg80211: Fix bitrates overflow issue</title>
<updated>2022-10-21T10:36:35Z</updated>
<author>
<name>Paul Zhang</name>
<email>quic_paulz@quicinc.com</email>
</author>
<published>2022-10-11T13:04:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=18429c51c7ff6e6bfd627316c54670230967a7e5'/>
<id>urn:sha1:18429c51c7ff6e6bfd627316c54670230967a7e5</id>
<content type='text'>
When invoking function cfg80211_calculate_bitrate_eht about
(320 MHz, EHT-MCS 13, EHT-NSS 2, EHT-GI 0), which means the
parameters as flags: 0x80, bw: 7, mcs: 13, eht_gi: 0, nss: 2,
this formula (result * rate-&gt;nss) will overflow and causes
the returned bitrate to be 3959 when it should be 57646.

Here is the explanation:
 u64 tmp;
 u32 result;
 …
 /* tmp = result = 4 * rates_996[0]
  *     = 4 * 480388888 = 0x72889c60
  */
 tmp = result;

 /* tmp = 0x72889c60 * 6144 = 0xabccea90000 */
 tmp *= SCALE;

 /* tmp = 0xabccea90000 / mcs_divisors[13]
  *     = 0xabccea90000 / 5120 = 0x8970bba6
  */
 do_div(tmp, mcs_divisors[rate-&gt;mcs]);

 /* result = 0x8970bba6 */
 result = tmp;

 /* normally (result * rate-&gt;nss) = 0x8970bba6 * 2 = 0x112e1774c,
  * but since result is u32, (result * rate-&gt;nss) = 0x12e1774c,
  * overflow happens and it loses the highest bit.
  * Then result =  0x12e1774c / 8 = 39595753,
  */
 result = (result * rate-&gt;nss) / 8;

Signed-off-by: Paul Zhang &lt;quic_paulz@quicinc.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: cfg80211: fix memory leak in query_regdb_file()</title>
<updated>2022-10-21T10:35:57Z</updated>
<author>
<name>Arend van Spriel</name>
<email>arend.vanspriel@broadcom.com</email>
</author>
<published>2022-10-20T11:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57b962e627ec0ae53d4d16d7bd1033e27e67677a'/>
<id>urn:sha1:57b962e627ec0ae53d4d16d7bd1033e27e67677a</id>
<content type='text'>
In the function query_regdb_file() the alpha2 parameter is duplicated
using kmemdup() and subsequently freed in regdb_fw_cb(). However,
request_firmware_nowait() can fail without calling regdb_fw_cb() and
thus leak memory.

Fixes: 007f6c5e6eb4 ("cfg80211: support loading regulatory database as firmware file")
Signed-off-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: cfg80211: silence a sparse RCU warning</title>
<updated>2022-10-21T10:34:46Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2022-10-13T17:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=03c0ad4b06c3566de624b4f4b78ac1a5d1e4c8e7'/>
<id>urn:sha1:03c0ad4b06c3566de624b4f4b78ac1a5d1e4c8e7</id>
<content type='text'>
All we're going to do with this pointer is assign it to
another __rcu pointer, but sparse can't see that, so
use rcu_access_pointer() to silence the warning here.

Fixes: c90b93b5b782 ("wifi: cfg80211: update hidden BSSes to avoid WARN_ON")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cve-fixes-2022-10-13'</title>
<updated>2022-10-13T09:59:56Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2022-10-13T09:59:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e7ad651c31c5e1289323e6c680be6e582a593b26'/>
<id>urn:sha1:e7ad651c31c5e1289323e6c680be6e582a593b26</id>
<content type='text'>
Pull in the fixes for various scan parsing bugs found by
Sönke Huster by fuzzing.
</content>
</entry>
<entry>
<title>wifi: cfg80211: update hidden BSSes to avoid WARN_ON</title>
<updated>2022-10-10T07:51:34Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2022-10-05T21:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c90b93b5b782891ebfda49d4e5da36632fefd5d1'/>
<id>urn:sha1:c90b93b5b782891ebfda49d4e5da36632fefd5d1</id>
<content type='text'>
When updating beacon elements in a non-transmitted BSS,
also update the hidden sub-entries to the same beacon
elements, so that a future update through other paths
won't trigger a WARN_ON().

The warning is triggered because the beacon elements in
the hidden BSSes that are children of the BSS should
always be the same as in the parent.

Reported-by: Sönke Huster &lt;shuster@seemoo.tu-darmstadt.de&gt;
Tested-by: Sönke Huster &lt;shuster@seemoo.tu-darmstadt.de&gt;
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: cfg80211: avoid nontransmitted BSS list corruption</title>
<updated>2022-10-10T07:51:01Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2022-09-30T22:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bcca852027e5878aec911a347407ecc88d6fff7f'/>
<id>urn:sha1:bcca852027e5878aec911a347407ecc88d6fff7f</id>
<content type='text'>
If a non-transmitted BSS shares enough information (both
SSID and BSSID!) with another non-transmitted BSS of a
different AP, then we can find and update it, and then
try to add it to the non-transmitted BSS list. We do a
search for it on the transmitted BSS, but if it's not
there (but belongs to another transmitted BSS), the list
gets corrupted.

Since this is an erroneous situation, simply fail the
list insertion in this case and free the non-transmitted
BSS.

This fixes CVE-2022-42721.

Reported-by: Sönke Huster &lt;shuster@seemoo.tu-darmstadt.de&gt;
Tested-by: Sönke Huster &lt;shuster@seemoo.tu-darmstadt.de&gt;
Fixes: 0b8fb8235be8 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
