kernel_samsung_a53x/drivers/net/wireguard
Jason A. Donenfeld 0405673099 wireguard: netlink: access device through ctx instead of peer
[ Upstream commit 71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f ]

The previous commit fixed a bug that led to a NULL peer->device being
dereferenced. It's actually easier and faster performance-wise to
instead get the device from ctx->wg. This semantically makes more sense
too, since ctx->wg->peer_allowedips.seq is compared with
ctx->allowedips_seq, basing them both in ctx. This also acts as a
defence in depth provision against freed peers.

Cc: stable@vger.kernel.org
Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 09:22:37 +01:00
..
selftest Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
allowedips.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
allowedips.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cookie.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cookie.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.c Revert "wireguard: use DEV_STATS_INC()" 2024-11-18 20:09:56 +01:00
device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
messages.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netlink.c wireguard: netlink: access device through ctx instead of peer 2024-11-19 09:22:37 +01:00
netlink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
noise.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
noise.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
peer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
peer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
peerlookup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
peerlookup.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
queueing.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
queueing.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ratelimiter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ratelimiter.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
receive.c wireguard: receive: annotate data-race around receiving_counter.counter 2024-11-19 08:44:59 +01:00
send.c Revert "wireguard: use DEV_STATS_INC()" 2024-11-18 20:09:56 +01:00
socket.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
socket.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timers.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
version.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00