mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
If a packet with bad checksum metadata gets into the ipv4 stack, skb_checksum_help can corrupt the network header and cause a bunch of mischief. This was discovered and reported by Paulos, and has been reporoduced by others independently since. We really shouldn't allow such packets in, but as a defence in depth measure, let's also check before we complete the checksum. A more complete validation at input is forthcoming, but needs more work. Cc: [email protected] Fixes:f43798c276("tun: Allow GSO using virtio_net_hdr") Fixes:bfd5f4a3d6("packet: Add GSO/csum offload support.") Reported-by: Paulos Yibelo <[email protected]> Closes: https://lore.kernel.org/netdev/[email protected]/ Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/0a012b4923e189c4c593ef4f471e5ff0edbe9030.1791412497.git.mst@redhat.com Signed-off-by: Jakub Kicinski <[email protected]>