aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LICENSES/deprecated/GFDL-1.1
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-09-14 18:42:00 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2022-09-16 14:49:14 +0100
commit533e9fdaa3720d1a6342f4a17dc2d0989b54e0e9 (patch)
tree189d895c9a0ad75ab1ed2b853588341227931e73 /LICENSES/deprecated/GFDL-1.1
parentwireguard: selftests: do not install headers on UML (diff)
downloadwireguard-linux-533e9fdaa3720d1a6342f4a17dc2d0989b54e0e9.tar.xz
wireguard-linux-533e9fdaa3720d1a6342f4a17dc2d0989b54e0e9.zip
wireguard: netlink: avoid variable-sized memcpy on sockaddr
Doing a variable-sized memcpy is slower, and the compiler isn't smart enough to turn this into a constant-size assignment. Further, Kees' latest fortified memcpy will actually bark, because the destination pointer is type sockaddr, not explicitly sockaddr_in or sockaddr_in6, so it thinks there's an overflow: memcpy: detected field-spanning write (size 28) of single field "&endpoint.addr" at drivers/net/wireguard/netlink.c:446 (size 16) Fix this by just assigning by using explicit casts for each checked case. Cc: Kees Cook <keescook@chromium.org> Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'LICENSES/deprecated/GFDL-1.1')
0 files changed, 0 insertions, 0 deletions