mirror-linux/drivers/net/wireguard
Jason A. Donenfeld f75e3eb08f wireguard: send: append trailer after expanding head
With how this is currently written, we add the trailer, zero it out, and
then add the header space on. If that header space requires a
reallocation + copy, the zeros in the trailer aren't copied, because the
skb len hasn't actually been yet expanded to cover that. Instead add the
padding at the end of the process rather than at the beginning.

Fixes: e7096c131e ("net: WireGuard secure network tunnel")
Cc: stable@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Link: https://patch.msgid.link/20260529173134.3080773-2-Jason@zx2c4.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-29 13:01:27 -07:00
..
generated wireguard: netlink: generate netlink code 2025-12-02 04:12:49 +01:00
selftest wireguard: allowedips: remove redundant space 2026-04-14 11:48:04 -07:00
Makefile wireguard: netlink: generate netlink code 2025-12-02 04:12:49 +01:00
allowedips.c wireguard: allowedips: Use kfree_rcu() instead of call_rcu() 2026-04-14 11:48:04 -07:00
allowedips.h wireguard: allowedips: add WGALLOWEDIP_F_REMOVE_ME flag 2025-05-27 09:06:19 +02:00
cookie.c lib/crypto: blake2s: Rename blake2s_state to blake2s_ctx 2025-10-29 22:04:24 -07:00
cookie.h
device.c wireguard: device: use exit_rtnl callback instead of manual rtnl_lock in pre_exit 2026-04-14 11:48:04 -07:00
device.h
main.c
messages.h
netlink.c wireguard: netlink: generate netlink code 2025-12-02 04:12:49 +01:00
netlink.h
noise.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
noise.h
peer.c
peer.h wireguard: peer: Replace sockaddr with sockaddr_inet 2025-07-25 15:29:58 -07:00
peerlookup.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
peerlookup.h
queueing.c
queueing.h wireguard: queueing: always return valid online CPU in wg_cpumask_choose_online() 2025-09-11 18:52:21 -07:00
ratelimiter.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ratelimiter.h
receive.c
send.c wireguard: send: append trailer after expanding head 2026-05-29 13:01:27 -07:00
socket.c drivers: net: drop ipv6_stub usage and use direct function calls 2026-03-29 11:21:23 -07:00
socket.h
timers.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
timers.h
version.h