All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-cve-announce@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@kernel.org>
Subject: CVE-2026-99615: l2tp: only return sessions of the given tunnel in l2tp_session_get()
Date: Fri, 20 Nov 2026 06:50:01 +0100	[thread overview]
Message-ID: <2026112031-CVE-2026-99615-a693@gregkh> (raw)

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

l2tp: only return sessions of the given tunnel in l2tp_session_get()

Commit 5f77c18ea556 ("l2tp: use IDR for all session lookups") made
pppol2tp_connect() and the netlink session commands find sessions with
l2tp_session_get(), passing the socket of the tunnel they name.

L2TPv3 session IDs are unique per network namespace, except that
sessions carried over UDP are only unique per UDP socket, the socket of
their tunnel. However, l2tp_v3_session_get() only checks the socket when
another session has the same session ID. Otherwise it returns the
session, whichever tunnel it belongs to. As of now, a session command
that names the wrong tunnel acts on a session of another tunnel, and a
PPPoL2TP socket for a second L2TPv3 tunnel fails with EEXIST, because it
finds session 0 of the first tunnel.

The issue can be reproduced with:

    ip l2tp add tunnel tunnel_id 3 peer_tunnel_id 3 encap udp \
        local 127.0.0.1 remote 127.0.0.1 udp_sport 5003 udp_dport 6003
    ip l2tp add tunnel tunnel_id 4 peer_tunnel_id 4 encap udp \
        local 127.0.0.1 remote 127.0.0.1 udp_sport 5004 udp_dport 6004
    ip l2tp add session tunnel_id 3 session_id 7 peer_session_id 7
    ip l2tp del session tunnel_id 4 session_id 7
    ip l2tp show session

Before that commit, the delete fails with "No such device", and session
7 of tunnel 3 is still listed. After that commit, the delete succeeds,
and session 7 of tunnel 3 is gone.

This patch will make l2tp_session_get() return NULL when the L2TPv3
session it finds does not belong to the given socket. The receive path
calls l2tp_v3_session_get() directly and is not changed.

The Linux kernel CVE team has assigned CVE-2026-99615 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 6.11 with commit 5f77c18ea55601822f9c495135a5b5d4b499d647 and fixed in 6.12.118 with commit 649d00a0e1ff2f5a4f5b8c194755f9b9bbd98504
	Issue introduced in 6.11 with commit 5f77c18ea55601822f9c495135a5b5d4b499d647 and fixed in 6.18.64 with commit 26cb789c98bdd4dcc2af6e083eeaa23c4d8715c4
	Issue introduced in 6.11 with commit 5f77c18ea55601822f9c495135a5b5d4b499d647 and fixed in 7.3.5 with commit 2dec8c5a6928f27a40e8880df2af3289693abbcd
	Issue introduced in 6.11 with commit 5f77c18ea55601822f9c495135a5b5d4b499d647 and fixed in 7.4-rc2 with commit a75facf4bb3e866103ddca4f47a6f3ca4b090d8b

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-99615
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	net/l2tp/l2tp_core.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/649d00a0e1ff2f5a4f5b8c194755f9b9bbd98504
	https://git.kernel.org/stable/c/26cb789c98bdd4dcc2af6e083eeaa23c4d8715c4
	https://git.kernel.org/stable/c/2dec8c5a6928f27a40e8880df2af3289693abbcd
	https://git.kernel.org/stable/c/a75facf4bb3e866103ddca4f47a6f3ca4b090d8b

                 reply	other threads:[~2026-11-20  5:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2026112031-CVE-2026-99615-a693@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=cve@kernel.org \
    --cc=gregkh@kernel.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.