netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jian.w.wen@oracle.com
Cc: netdev@vger.kernel.org, gnault@redhat.com
Subject: Re: [PATCH net] l2tp: copy 4 more bytes to linear part if necessary
Date: Thu, 31 Jan 2019 09:20:34 -0800 (PST)	[thread overview]
Message-ID: <20190131.092034.604580592356896496.davem@davemloft.net> (raw)
In-Reply-To: <20190131071856.22120-1-jian.w.wen@oracle.com>

From: Jacob Wen <jian.w.wen@oracle.com>
Date: Thu, 31 Jan 2019 15:18:56 +0800

> The size of L2TPv2 header with all optional fields is 14 bytes.
> l2tp_udp_recv_core only moves 10 bytes to the linear part of a
> skb. This may lead to l2tp_recv_common read data outside of a skb.
> 
> This patch make sure that there is at least 14 bytes in the linear
> part of a skb to meet the maximum need of l2tp_udp_recv_core and
> l2tp_recv_common. The minimum size of both PPP HDLC-like frame and
> Ethernet frame is larger than 14 bytes, so we are safe to do so.
> 
> Also remove L2TP_HDR_SIZE_NOSEQ, it is unused now.
> 
> Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
> Suggested-by: Guillaume Nault <gnault@redhat.com>
> Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>

Applied and queued up for -stable, thanks.

      parent reply	other threads:[~2019-01-31 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31  7:18 [PATCH net] l2tp: copy 4 more bytes to linear part if necessary Jacob Wen
2019-01-31  8:43 ` Guillaume Nault
2019-01-31 17:20 ` 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=20190131.092034.604580592356896496.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gnault@redhat.com \
    --cc=jian.w.wen@oracle.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).