From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
mst@redhat.com, edumazet@google.com,
Daniel Borkmann <dborkman@redhat.com>
Subject: Re: [PATCH net-next 1/2] net_sched: don't do precise pkt_len computation for untrusted packets
Date: Wed, 20 Mar 2013 06:46:19 -0700 [thread overview]
Message-ID: <1363787179.3333.6.camel@edumazet-glaptop> (raw)
In-Reply-To: <514954F0.2040604@redhat.com>
On Wed, 2013-03-20 at 14:19 +0800, Jason Wang wrote:
> I was consider a just skb_reset_transport_header() here. Consider the
> transport header maybe checked and reset during header check for packets
> of gso or partial checksum. And bypass precise pkt len computation.
>
> Some problems with skb_flow_dissect():
>
> - it can only recognizes a subset of all ethernet protocols. The may
> blocks guest who may want to use other protocol such as IPX.
Oh yes IPX
> - almost no check in the validity of the L4 protocol header which may be
> used by qdisc_pkt_len_init(), which may still give a chance to evil
> guest to use
> - gso_segs were untouched (still zero)
>
> Another method is doing header check here which needs more work.
Most uses are caught by the helper.
So in the case dissection fails, just reset transport header instead of
dropping as I suggested.
Otherwise, set the transport header to the right value
-> precise qdisc pkt lengths.
Instead of pretending DODGY packets have no headers, at least try to do
the right thing.
prev parent reply other threads:[~2013-03-20 13:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 7:41 [PATCH net-next 1/2] net_sched: don't do precise pkt_len computation for untrusted packets Jason Wang
2013-03-15 7:41 ` [PATCH net-next 2/2] net: reset transport header if it was not set before transmission Jason Wang
2013-03-16 2:10 ` Eric Dumazet
2013-03-17 16:13 ` David Miller
2013-03-19 9:26 ` Jason Wang
2013-03-19 12:13 ` Eric Dumazet
2013-03-19 12:58 ` Daniel Borkmann
2013-03-19 12:59 ` Eric Dumazet
2013-03-19 13:52 ` Daniel Borkmann
2013-03-17 16:10 ` [PATCH net-next 1/2] net_sched: don't do precise pkt_len computation for untrusted packets David Miller
2013-03-19 9:25 ` Jason Wang
2013-03-19 12:10 ` Eric Dumazet
2013-03-19 12:58 ` Eric Dumazet
2013-03-20 6:19 ` Jason Wang
2013-03-20 13:46 ` Eric Dumazet [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=1363787179.3333.6.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/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