]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
wireguard: allowedips: initialize list head in selftest
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 4 Jun 2021 15:17:35 +0000 (17:17 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 30 Jun 2021 06:27:53 +0000 (08:27 +0200)
commit8884bb433b7ea20dda7eec2d03d7be00a2e5c87d
tree7dc600f1a9eb7415607fb92a069774a55424b9ee
parentf7136da0359fb7675f85267ff565c15879920315
wireguard: allowedips: initialize list head in selftest

BugLink: https://bugs.launchpad.net/bugs/1933691
commit 46cfe8eee285cde465b420637507884551f5d7ca upstream.

The randomized trie tests weren't initializing the dummy peer list head,
resulting in a NULL pointer dereference when used. Fix this by
initializing it in the randomized trie test, just like we do for the
static unit test.

While we're at it, all of the other strings like this have the word
"self-test", so add it to the missing place here.

Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Cc: stable@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/wireguard/selftest/allowedips.c