[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpViiE4LeNEfVjS2vHpz3hjDbpwBiCdGsi7k6m3JysiaCQ@mail.gmail.com>
Date: Tue, 4 Dec 2018 12:23:48 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Linux Kernel Network Developers <netdev@...r.kernel.org>
Cc: Tariq Toukan <tariqt@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [Patch net] mlx5: check for malformed packets
On Sat, Dec 1, 2018 at 12:38 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> is_last_ethertype_ip() is used to check IP/IPv6 protocol before
> parsing IP/IPv6 headers.
>
> But __vlan_get_protocol() is only bound to skb->len, a malicious
> packet could exhaust all skb->len by inserting sufficient ETH_P_8021AD
> headers, and it may not even contain an IP/IPv6 header at all, so we
> have to check if we are still safe to continue to parse IP/IPv6 header.
> If not, treat it as non-IP packet.
>
> This should not cause any crash as we stil have tail room in skb,
> but we can't just rely on it either.
>
> Cc: Tariq Toukan <tariqt@...lanox.com>
> Cc: Saeed Mahameed <saeedm@...lanox.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
NAcked-by: Cong Wang <xiyou.wangcong@...il.com>
This patch has no value for upstream. Let's discard it.
Thanks!
Powered by blists - more mailing lists