mirror-linux/drivers/net/netdevsim
Nikola Z. Ivanov 35eaa6d8d6 netdevsim: zero initialize struct iphdr in dummy sk_buff
Syzbot reports a KMSAN uninit-value originating from
nsim_dev_trap_skb_build, with the allocation also
being performed in the same function.

Fix this by calling skb_put_zero instead of skb_put to
guarantee zero initialization of the whole IP header.

Closes: https://syzkaller.appspot.com/bug?extid=23d7fcd204e3837866ff
Fixes: da58f90f11 ("netdevsim: Add devlink-trap support")
Signed-off-by: Nikola Z. Ivanov <zlatistiv@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260426201434.742030-1-zlatistiv@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-27 17:03:13 -07:00
..
Makefile netdevsim: move TC offload code to a dedicated file 2026-03-20 20:13:14 -07:00
bpf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bus.c net: netdevsim: correct typo in new_device_store error message 2026-03-20 20:12:01 -07:00
dev.c netdevsim: zero initialize struct iphdr in dummy sk_buff 2026-04-27 17:03:13 -07:00
ethtool.c ethtool: add FEC bins histogram report 2025-09-26 16:49:18 -07:00
fib.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
health.c devlink: Move graceful period parameter to reporter ops 2025-08-26 17:24:16 -07:00
hwstats.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ipsec.c netdevsim: add ipsec hw_features 2025-10-16 15:44:32 -07:00
macsec.c netdevsim: macsec: pad u64 to correct length in logs 2024-10-23 09:51:06 +02:00
netdev.c netdevsim: convert to ndo_set_rx_mode_async 2026-04-21 12:50:25 +02:00
netdevsim.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-04-14 12:04:00 -07:00
psample.c net: use get_random_u{16,32,64}() where appropriate 2026-04-09 19:27:43 -07:00
psp.c netdevsim: use u64_stats_t with u64_stats_sync properly 2026-01-26 19:53:36 -08:00
tc.c netdevsim: support tc-ets offload 2026-03-20 20:13:14 -07:00
udp_tunnels.c netdevsim: remove udp_ports_sleep 2025-06-18 18:53:51 -07:00