mbox series

[v2,0/2] net: prevent infinite loop caused by incorrect proto from virtio_net_hdr_set_proto

Message ID cover.1615199056.git.bnemeth@redhat.com (mailing list archive)
Headers show
Series net: prevent infinite loop caused by incorrect proto from virtio_net_hdr_set_proto | expand

Message

Balazs Nemeth March 8, 2021, 10:31 a.m. UTC
Here is v2 of the patches that prevent an infinite loop for gso packets
with a protocol from virtio net hdr that doesn't match the protocol in
the packet. Note that packets coming from a device without
header_ops->parse_protocol being implemented will not be caught by
the check in virtio_net_hdr_to_skb, but the infinite loop will still
be prevented by the check in the gso layer.

Balazs Nemeth (2):
  net: check if protocol extracted by virtio_net_hdr_set_proto is
    correct
  net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0

 include/linux/virtio_net.h | 8 +++++++-
 net/mpls/mpls_gso.c        | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

--
2.29.2