netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: gnault@redhat.com
Cc: kuba@kernel.org, netdev@vger.kernel.org,
	martin.varghese@nokia.com, dcaratti@redhat.com
Subject: Re: [PATCH net] net/core: check length before updating Ethertype in skb_mpls_{push,pop}
Date: Sun, 04 Oct 2020 15:10:16 -0700 (PDT)	[thread overview]
Message-ID: <20201004.151016.247027928254011553.davem@davemloft.net> (raw)
In-Reply-To: <71ec98d51cc4aab7615061336fb1498ad16cda30.1601667845.git.gnault@redhat.com>

From: Guillaume Nault <gnault@redhat.com>
Date: Fri, 2 Oct 2020 21:53:08 +0200

> 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@redhat.com>

Applied and queued up for -stable, thanks.

      parent reply	other threads:[~2020-10-04 22:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 19:53 [PATCH net] net/core: check length before updating Ethertype in skb_mpls_{push,pop} Guillaume Nault
2020-10-04 14:00 ` Davide Caratti
2020-10-04 14:50 ` Varghese, Martin (Nokia - IN/Bangalore)
2020-10-04 21:29   ` David Miller
2020-10-04 22:10 ` David Miller [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=20201004.151016.247027928254011553.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=gnault@redhat.com \
    --cc=kuba@kernel.org \
    --cc=martin.varghese@nokia.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;
as well as URLs for NNTP newsgroup(s).