[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1363787179.3333.6.camel@edumazet-glaptop>
Date: Wed, 20 Mar 2013 06:46:19 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jason Wang <jasowang@...hat.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, mst@...hat.com, edumazet@...gle.com,
Daniel Borkmann <dborkman@...hat.com>
Subject: Re: [PATCH net-next 1/2] net_sched: don't do precise pkt_len
computation for untrusted packets
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists