[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB7PR07MB388310D80E3D8AF484EEB266ED0F0@DB7PR07MB3883.eurprd07.prod.outlook.com>
Date: Sun, 4 Oct 2020 14:50:58 +0000
From: "Varghese, Martin (Nokia - IN/Bangalore)" <martin.varghese@...ia.com>
To: Guillaume Nault <gnault@...hat.com>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Davide Caratti <dcaratti@...hat.com>
Subject: RE: [PATCH net] net/core: check length before updating Ethertype in
skb_mpls_{push,pop}
On Fri, 2020-10-02 at 21:53 +0200, Guillaume Nault wrote:
> Openvswitch allows to drop a packet's Ethernet header, therefore
>skb_mpls_push() and skb_mpls_pop() might be called with ethernet=true and mac_len=0. In that case the pointer passed to skb_mod_eth_type() >doesn't point to an Ethernet header and the new Ethertype is written at unexpected locations.
>Fix this by verifying that mac_len is big enough to contain an Ethernet header.
>Fixes: fa4e0f8855fc ("net/sched: fix corrupted L2 header with MPLS 'push' and 'pop' actions")
>Signed-off-by: Guillaume Nault <gnault@...hat.com>
Is this check redundant. I believe Openvswitch already takes care of it ?
Powered by blists - more mailing lists