linux_dsm_epyc7002/drivers/net/wireguard
Jason A. Donenfeld 900575aa33 wireguard: device: avoid circular netns references
Before, we took a reference to the creating netns if the new netns was
different. This caused issues with circular references, with two
wireguard interfaces swapping namespaces. The solution is to rather not
take any extra references at all, but instead simply invalidate the
creating netns pointer when that netns is deleted.

In order to prevent this from happening again, this commit improves the
rough object leak tracking by allowing it to account for created and
destroyed interfaces, aside from just peers and keys. That then makes it
possible to check for the object leak when having two interfaces take a
reference to each others' namespaces.

Fixes: e7096c131e ("net: WireGuard secure network tunnel")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-23 14:50:34 -07:00
..
selftest wireguard: noise: separate receive counter from send counter 2020-05-20 20:55:09 -07:00
allowedips.c wireguard: allowedips: fix use-after-free in root_remove_peer_lists 2020-02-05 14:14:18 +01:00
allowedips.h
cookie.c
cookie.h
device.c wireguard: device: avoid circular netns references 2020-06-23 14:50:34 -07:00
device.h wireguard: device: avoid circular netns references 2020-06-23 14:50:34 -07:00
main.c wireguard: main: remove unused include <linux/version.h> 2019-12-16 19:22:22 -08:00
Makefile
messages.h wireguard: queueing: preserve flow hash across packet scrubbing 2020-05-20 20:55:09 -07:00
netlink.c wireguard: device: avoid circular netns references 2020-06-23 14:50:34 -07:00
netlink.h
noise.c wireguard: noise: do not assign initiation time in if condition 2020-06-23 14:50:34 -07:00
noise.h wireguard: noise: separate receive counter from send counter 2020-05-20 20:55:09 -07:00
peer.c wireguard: noise: error out precomputed DH during handshake rather than config 2020-03-18 18:51:43 -07:00
peer.h
peerlookup.c
peerlookup.h
queueing.c wireguard: queueing: cleanup ptr_ring in error path of packet_queue_init 2020-04-29 14:23:05 -07:00
queueing.h wireguard: queueing: preserve flow hash across packet scrubbing 2020-05-20 20:55:09 -07:00
ratelimiter.c
ratelimiter.h
receive.c wireguard: noise: separate receive counter from send counter 2020-05-20 20:55:09 -07:00
send.c wireguard: noise: separate receive counter from send counter 2020-05-20 20:55:09 -07:00
socket.c wireguard: device: avoid circular netns references 2020-06-23 14:50:34 -07:00
socket.h
timers.c
timers.h
version.h