netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Balazs Nemeth <bnemeth@redhat.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mst@redhat.com,
	jasowang@redhat.com, davem@davemloft.net, willemb@google.com,
	virtualization@lists.linux-foundation.org, bnemeth@redhat.com
Subject: [PATCH v2 0/2] net: prevent infinite loop caused by incorrect proto from virtio_net_hdr_set_proto
Date: Mon,  8 Mar 2021 11:31:24 +0100	[thread overview]
Message-ID: <cover.1615199056.git.bnemeth@redhat.com> (raw)

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


             reply	other threads:[~2021-03-08 10:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 10:31 Balazs Nemeth [this message]
2021-03-08 10:31 ` [PATCH v2 1/2] net: check if protocol extracted by virtio_net_hdr_set_proto is correct Balazs Nemeth
2021-03-08 16:01   ` Willem de Bruijn
2021-03-09 11:26   ` Michael S. Tsirkin
2021-03-09 14:02     ` Willem de Bruijn
2021-03-08 10:31 ` [PATCH v2 2/2] net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0 Balazs Nemeth
2021-03-08 16:07   ` Willem de Bruijn
2021-03-08 16:17     ` David Ahern
2021-03-08 16:26       ` Balazs Nemeth
2021-03-08 16:42         ` David Ahern
2021-03-08 18:11           ` Willem de Bruijn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1615199056.git.bnemeth@redhat.com \
    --to=bnemeth@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).