netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Parkin <tparkin@katalix.com>
To: Guillaume Nault <gnault@redhat.com>
Cc: Ridge Kennedy <ridge.kennedy@alliedtelesis.co.nz>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] l2tp: Allow duplicate session creation with UDP
Date: Thu, 16 Jan 2020 21:23:32 +0000	[thread overview]
Message-ID: <20200116212332.GD4028@jackdaw> (raw)
In-Reply-To: <20200116190556.GA25654@linux.home>

[-- Attachment #1: Type: text/plain, Size: 3039 bytes --]

On  Thu, Jan 16, 2020 at 20:05:56 +0100, Guillaume Nault wrote:
> On Thu, Jan 16, 2020 at 01:12:24PM +0000, Tom Parkin wrote:
> > I agree with you about the possibility for cross-talk, and I would
> > welcome l2tp_ip/ip6 doing more validation.  But I don't think we should
> > ditch the global list.
> > 
> > As per the RFC, for L2TPv3 the session ID should be a unique
> > identifier for the LCCE.  So it's reasonable that the kernel should
> > enforce that when registering sessions.
> > 
> I had never thought that the session ID could have global significance
> in L2TPv3, but maybe that's because my experience is mostly about
> L2TPv2. I haven't read RFC 3931 in detail, but I can't see how
> restricting the scope of sessions to their parent tunnel would conflict
> with the RFC.

Sorry Guillaume, I responded to your other mail without reading this
one.

I gave more detail in my other response: it boils down to how RFC 3931
changes the use of IDs in the L2TP header.  Data packets for IP or UDP
only contain the 32-bit session ID, and hence this must be unique to
the LCCE to allow the destination session to be successfully
identified.

> > When you're referring to cross-talk, I wonder whether you have in mind
> > normal operation or malicious intent?  I suppose it would be possible
> > for someone to craft session data packets in order to disrupt a
> > session.
> > 
> What makes me uneasy is that, as soon as the l2tp_ip or l2tp_ip6 module
> is loaded, a peer can reach whatever L2TPv3 session exists on the host
> just by sending an L2TP_IP packet to it.
> I don't know how practical it is to exploit this fact, but it looks
> like it's asking for trouble.

Yes, I agree, although practically it's only a slightly easier
"exploit" than L2TP/UDP offers.

The UDP case requires a rogue packet to be delivered to the correct
socket AND have a session ID matching that of one in the associated
tunnel.

It's a slightly more arduous scenario to engineer than the existing
L2TPv3/IP case, but only a little.

I also don't know how practical this would be to leverage to cause
problems.

> > For normal operation, you just need to get the wrong packet on the
> > wrong socket to run into trouble of course.  In such a situation
> > having a unique session ID for v3 helps you to determine that
> > something has gone wrong, which is what the UDP encap recv path does
> > if the session data packet's session ID isn't found in the context of
> > the socket that receives it.
> Unique global session IDs might help troubleshooting, but they also
> break some use cases, as reported by Ridge. At some point, we'll have
> to make a choice, or even add a knob if necessary.

I suspect we need to reach agreement on what RFC 3931 implies before
making headway on what the kernel should ideally do.

There is perhaps room for pragmatism given that the kernel
used to be more permissive prior to dbdbc73b4478, and we weren't
inundated with reports of session ID clashes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-01-16 21:23 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 22:34 [PATCH net] l2tp: Allow duplicate session creation with UDP Ridge Kennedy
2020-01-16 12:31 ` Tom Parkin
2020-01-16 19:28   ` Guillaume Nault
2020-01-16 21:05     ` Tom Parkin
2020-01-17 13:43       ` Guillaume Nault
2020-01-17 18:59         ` Tom Parkin
2020-01-18 17:18           ` Guillaume Nault
2020-01-16 12:38 ` Guillaume Nault
2020-01-16 13:12   ` Tom Parkin
2020-01-16 19:05     ` Guillaume Nault
2020-01-16 21:23       ` Tom Parkin [this message]
2020-01-16 21:50         ` Ridge Kennedy
2020-01-17 13:18           ` Tom Parkin
2020-01-17 14:25             ` Guillaume Nault
2020-01-17 19:19               ` Tom Parkin
2020-01-18 19:13                 ` Guillaume Nault
2020-01-20 15:09                   ` Tom Parkin
2020-01-21 16:35                     ` Guillaume Nault
2020-01-22 11:55                       ` James Chapman
2020-01-25 11:57                         ` Guillaume Nault
2020-01-27  9:25                           ` James Chapman
2020-01-29 11:44                             ` Guillaume Nault
2020-01-30 10:28                               ` James Chapman
2020-01-30 22:34                                 ` Guillaume Nault
2020-01-31  8:12                                   ` James Chapman
2020-01-31 12:49                                     ` Guillaume Nault
2020-01-31  9:55                                   ` Tom Parkin
2020-01-31 12:50                                     ` Guillaume Nault
2020-01-17 16:36         ` Guillaume Nault
2020-01-17 19:29           ` Tom Parkin
2020-01-18 17:52             ` Guillaume Nault
2020-01-20 11:47               ` Tom Parkin
2020-01-16 21:26   ` Ridge Kennedy
2020-01-31 12:58     ` Guillaume Nault
2020-02-03 23:29       ` Ridge Kennedy

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=20200116212332.GD4028@jackdaw \
    --to=tparkin@katalix.com \
    --cc=gnault@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=ridge.kennedy@alliedtelesis.co.nz \
    /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).