mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
net: avoid skb_warn_bad_offload on IS_ERR
commit8d74e9f88dupstream. skb_warn_bad_offload warns when packets enter the GSO stack that require skb_checksum_help or vice versa. Do not warn on arbitrary bad packets. Packet sockets can craft many. Syzkaller was able to demonstrate another one with eth_type games. In particular, suppress the warning when segmentation returns an error, which is for reasons other than checksum offload. See also commit36c9247449("net: WARN if skb_checksum_help() is called on skb requiring segmentation") for context on this warning. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4b1932a19b
commit
c1eb38748c
@@ -2598,7 +2598,7 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
|
||||
|
||||
segs = skb_mac_gso_segment(skb, features);
|
||||
|
||||
if (unlikely(skb_needs_check(skb, tx_path)))
|
||||
if (unlikely(skb_needs_check(skb, tx_path) && !IS_ERR(segs)))
|
||||
skb_warn_bad_offload(skb);
|
||||
|
||||
return segs;
|
||||
|
||||
Reference in New Issue
Block a user