ZeroDay Brief
CVE-2024-49940

In the Linux kernel, the following vulnerability has been resolved: l2tp: prevent possible tunnel refcount underflow When a session is created, it sets a backpointer to its tunnel.

CVSS
5.5Medium
Chance of exploitation (EPSS)
—
Published
Oct 21, 2024
In the news
9 stories
Vendor advisory More from this vendor

What to do

A moderate security flaw in Linux kernel that needs access to the machine itself. No attacks are reported yet; it can go in your normal patch cycle.

Action: Apply the vendor's update or follow its advisory.

Fixed in: 3.3, 3.17, 4.5, 4.10, 4.15

Affected versions
Linux
3.16.54 to before 3.17; 3.2.99 to before 3.3; 4.14.182 to before 4.15; 4.15; 4.4.225 to before 4.5; 4.9.225 to before 4.10

Description

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

l2tp: prevent possible tunnel refcount underflow

When a session is created, it sets a backpointer to its tunnel. When
the session refcount drops to 0, l2tp_session_free drops the tunnel
refcount if session->tunnel is non-NULL. However, session->tunnel is
set in l2tp_session_create, before the tunnel refcount is incremented
by l2tp_session_register, which leaves a small window where
session->tunnel is non-NULL when the tunnel refcount hasn't been
bumped.

Moving the assignment to l2tp_session_register is trivial but
l2tp_session_create calls l2tp_session_set_header_len which uses
session->tunnel to get the tunnel's encap. Add an encap arg to
l2tp_session_set_header_len to avoid using session->tunnel.

If l2tpv3 sessions have colliding IDs, it is possible for
l2tp_v3_session_get to race with l2tp_session_register and fetch a
session which doesn't yet have session->tunnel set. Add a check for
this case.

Affected products

Get alerts for these →

Timeline 12

Latest change: USN-9192-1: Linux kernel (NVIDIA) vulnerabilities (Nov 24, 2026)

News, advisories, exploit code, scanner detection and exploitation, newest first.

References 4

You are leaving ZeroDay Brief

This link goes to exploit code on a third-party site. We find these links automatically and do not test, review or vouch for them. They may contain malware or fake exploits.

We are not responsible for anything that happens if you open the page or run its code. Never run exploit code on systems you care about.

↑ ↓ moveEnter openEsc closeTry “CVE-2026”, “fortinet” or “ivanti”