aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2024-03-14 16:49:10 -0600
committerPaolo Abeni <pabeni@redhat.com>2024-03-19 11:22:50 +0100
commit71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f (patch)
tree5031286bc7301b86688e44053c9ae8a3c2349f5c /tools/testing/selftests
parentwireguard: netlink: check for dangling peer via is_dead instead of empty list (diff)
downloadwireguard-linux-71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f.tar.xz
wireguard-linux-71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f.zip
wireguard: netlink: access device through ctx instead of peer
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>
Diffstat (limited to 'tools/testing/selftests')
0 files changed, 0 insertions, 0 deletions