All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: edumazet@google.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, willemb@google.com
Subject: Re: [PATCH net] net: be more gentle about silly gso requests coming from user
Date: Thu, 28 May 2020 16:34:29 -0700 (PDT)	[thread overview]
Message-ID: <20200528.163429.484731339357929160.davem@davemloft.net> (raw)
In-Reply-To: <20200528215747.45306-1-edumazet@google.com>

From: Eric Dumazet <edumazet@google.com>
Date: Thu, 28 May 2020 14:57:47 -0700

> Recent change in virtio_net_hdr_to_skb() broke some packetdrill tests.
> 
> When --mss=XXX option is set, packetdrill always provide gso_type & gso_size
> for its inbound packets, regardless of packet size.
> 
> 	if (packet->tcp && packet->mss) {
> 		if (packet->ipv4)
> 			gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
> 		else
> 			gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6;
> 		gso.gso_size = packet->mss;
> 	}
> 
> Since many other programs could do the same, relax virtio_net_hdr_to_skb()
> to no longer return an error, but instead ignore gso settings.
> 
> This keeps Willem intent to make sure no malicious packet could
> reach gso stack.
> 
> Note that TCP stack has a special logic in tcp_set_skb_tso_segs()
> to clear gso_size for small packets.
> 
> Fixes: 6dd912f82680 ("net: check untrusted gso_size at kernel entry")
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied and queued up for -stable, thanks Eric.

      parent reply	other threads:[~2020-05-28 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 21:57 [PATCH net] net: be more gentle about silly gso requests coming from user Eric Dumazet
2020-05-28 22:08 ` Willem de Bruijn
2020-05-28 23:34 ` David Miller [this message]

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=20200528.163429.484731339357929160.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.