<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/net/wireless/marvell, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/net/wireless/marvell?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/net/wireless/marvell?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-23T17:11:09Z</updated>
<entry>
<title>wireless: marvell: Replace zero-length array with flexible-array member</title>
<updated>2020-03-23T17:11:09Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-25T02:04:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2a6be797d232a4aec7be013964a5c2b8a1a46a3e'/>
<id>urn:sha1:2a6be797d232a4aec7be013964a5c2b8a1a46a3e</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Ganapathi Bhat &lt;ganapathi.bhat@nxp.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200225020413.GA8057@embeddedor
</content>
</entry>
<entry>
<title>libertas: Replace zero-length array with flexible-array member</title>
<updated>2020-03-23T17:00:31Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-25T01:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c5047d5b831bb5f4dfa22230a2f64794ed20ea82'/>
<id>urn:sha1:c5047d5b831bb5f4dfa22230a2f64794ed20ea82</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200225011709.GA601@embeddedor
</content>
</entry>
<entry>
<title>libertas: Use new structure for SPI transfer delays</title>
<updated>2020-03-12T13:42:39Z</updated>
<author>
<name>Sergiu Cuciurean</name>
<email>sergiu.cuciurean@analog.com</email>
</author>
<published>2020-02-27T14:06:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=32521a913852a730a2017e6552495e1facacdd8b'/>
<id>urn:sha1:32521a913852a730a2017e6552495e1facacdd8b</id>
<content type='text'>
In a recent change to the SPI subsystem [1], a new `delay` struct was added
to replace the `delay_usecs`. This change replaces the current
`delay_usecs` with `delay` for this driver.

The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
that both `delay_usecs` &amp; `delay` are used (in this order to preserve
backwards compatibility).

[1] commit bebcfd272df6 ("spi: introduce `delay` field for
`spi_transfer` + spi_transfer_delay_exec()")

Signed-off-by: Sergiu Cuciurean &lt;sergiu.cuciurean@analog.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>mwifiex: set needed_headroom, not hard_header_len</title>
<updated>2020-03-12T13:41:50Z</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2020-02-27T00:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9454f7a895b822dd8fb4588fc55fda7c96728869'/>
<id>urn:sha1:9454f7a895b822dd8fb4588fc55fda7c96728869</id>
<content type='text'>
hard_header_len provides limitations for things like AF_PACKET, such
that we don't allow transmitting packets smaller than this.

needed_headroom provides a suggested minimum headroom for SKBs, so that
we can trivally add our headers to the front.

The latter is the correct field to use in this case, while the former
mostly just prevents sending small AF_PACKET frames.

In any case, mwifiex already does its own bounce buffering [1] if we
don't have enough headroom, so hints (not hard limits) are all that are
needed.

This is the essentially the same bug (and fix) that brcmfmac had, fixed
in commit cb39288fd6bb ("brcmfmac: use ndev-&gt;needed_headroom to reserve
additional header space").

[1] mwifiex_hard_start_xmit():
	if (skb_headroom(skb) &lt; MWIFIEX_MIN_DATA_HEADER_LEN) {
	[...]
		/* Insufficient skb headroom - allocate a new skb */

Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Acked-by: Ganapathi Bhat &lt;ganapathi.gbhat@nxp.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>mwifiex: change license text from MARVELL to NXP</title>
<updated>2020-02-14T12:41:54Z</updated>
<author>
<name>Ganapathi Bhat</name>
<email>ganapathi.bhat@nxp.com</email>
</author>
<published>2020-02-12T16:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=932183aa35c62e9657585382de641716088a0023'/>
<id>urn:sha1:932183aa35c62e9657585382de641716088a0023</id>
<content type='text'>
As of 6-DEC-2019, NXP has acquired Marvell’s Wireless business
unit. This change is to update the license text accordingly.

Signed-off-by: James Cao &lt;zheng.cao@nxp.com&gt;
Signed-off-by: Cathy Luo &lt;xiaohua.luo@nxp.com&gt;
Signed-off-by: Ganapathi Bhat &lt;ganapathi.bhat@nxp.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>libertas: make lbs_ibss_join_existing() return error code on rates overflow</title>
<updated>2020-01-27T14:36:33Z</updated>
<author>
<name>Nicolai Stange</name>
<email>nstange@suse.de</email>
</author>
<published>2020-01-14T10:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1754c4f60aaf1e17d886afefee97e94d7f27b4cb'/>
<id>urn:sha1:1754c4f60aaf1e17d886afefee97e94d7f27b4cb</id>
<content type='text'>
Commit e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss
descriptor") introduced a bounds check on the number of supplied rates to
lbs_ibss_join_existing() and made it to return on overflow.

However, the aforementioned commit doesn't set the return value accordingly
and thus, lbs_ibss_join_existing() would return with zero even though it
failed.

Make lbs_ibss_join_existing return -EINVAL in case the bounds check on the
number of supplied rates fails.

Fixes: e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss descriptor")
Signed-off-by: Nicolai Stange &lt;nstange@suse.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>libertas: don't exit from lbs_ibss_join_existing() with RCU read lock held</title>
<updated>2020-01-27T14:35:55Z</updated>
<author>
<name>Nicolai Stange</name>
<email>nstange@suse.de</email>
</author>
<published>2020-01-14T10:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c7bf1fb7ddca331780b9a733ae308737b39f1ad4'/>
<id>urn:sha1:c7bf1fb7ddca331780b9a733ae308737b39f1ad4</id>
<content type='text'>
Commit e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss
descriptor") introduced a bounds check on the number of supplied rates to
lbs_ibss_join_existing().

Unfortunately, it introduced a return path from within a RCU read side
critical section without a corresponding rcu_read_unlock(). Fix this.

Fixes: e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss descriptor")
Signed-off-by: Nicolai Stange &lt;nstange@suse.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv()</title>
<updated>2020-01-27T14:34:34Z</updated>
<author>
<name>Qing Xu</name>
<email>m1s5p6688@gmail.com</email>
</author>
<published>2020-01-02T02:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d'/>
<id>urn:sha1:b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d</id>
<content type='text'>
mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking
the destination size may trigger a buffer overflower,
which a local user could use to cause denial of service
or the execution of arbitrary code.
Fix it by putting the length check before calling memcpy().

Signed-off-by: Qing Xu &lt;m1s5p6688@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status()</title>
<updated>2020-01-27T14:34:33Z</updated>
<author>
<name>Qing Xu</name>
<email>m1s5p6688@gmail.com</email>
</author>
<published>2020-01-02T02:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3a9b153c5591548612c3955c9600a98150c81875'/>
<id>urn:sha1:3a9b153c5591548612c3955c9600a98150c81875</id>
<content type='text'>
mwifiex_ret_wmm_get_status() calls memcpy() without checking the
destination size.Since the source is given from remote AP which
contains illegal wmm elements , this may trigger a heap buffer
overflow.
Fix it by putting the length check before calling memcpy().

Signed-off-by: Qing Xu &lt;m1s5p6688@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>mwifiex: fix unbalanced locking in mwifiex_process_country_ie()</title>
<updated>2020-01-27T14:33:14Z</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2020-01-06T22:42:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=65b1aae0d9d5962faccc06bdb8e91a2a0b09451c'/>
<id>urn:sha1:65b1aae0d9d5962faccc06bdb8e91a2a0b09451c</id>
<content type='text'>
We called rcu_read_lock(), so we need to call rcu_read_unlock() before
we return.

Fixes: 3d94a4a8373b ("mwifiex: fix possible heap overflow in mwifiex_process_country_ie()")
Cc: stable@vger.kernel.org
Cc: huangwen &lt;huangwenabc@gmail.com&gt;
Cc: Ganapathi Bhat &lt;ganapathi.bhat@nxp.com&gt;
Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Acked-by: Ganapathi Bhat &lt;ganapathi.bhat@nxp.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
</feed>
