[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101006.235343.98903661.davem@davemloft.net>
Date: Wed, 06 Oct 2010 23:53:43 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: phil@....cc
Cc: netdev@...r.kernel.org, johann.baudy@...-log.net,
eric.dumazet@...il.com
Subject: Re: sending VLAN packets via packet_mmap
From: Phil Sutter <phil@....cc>
Date: Thu, 30 Sep 2010 21:24:14 +0200
> The actual problem in tpacket_snd() is this:
>
> | reserve = dev->hard_header_len;
> | [...]
> | if (size_max > dev->mtu + reserve)
> | size_max = dev->mtu + reserve;
>
> I guess the check is there to avoid skb overflows on malicious data
> input. Is this correct? Are there other reasons for it's existence?
We can add a special allowance of 4 extra bytes in this size check
_iff_ the device is ethernet and the NETIF_F_VLAN_CHALLENGED netdev
feature bit is not set.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists