CVE-2024-49940: l2tp: prevent possible tunnel refcount underflow
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.
Security readout for executives and security teams
Plain-English summary
A race in the Linux kernel’s L2TP session lifecycle can mismanage a tunnel reference count. A locally authenticated, low-privilege user may be able to trigger serious kernel-level consequences, potentially affecting confidentiality, integrity, and availability. Prioritize systems using affected kernels where untrusted local users can reach L2TP functionality.
Executive priority
Treat this as a high-priority kernel maintenance issue, especially on shared Linux systems or hosts running untrusted workloads. It is not documented as remotely exploitable or actively exploited in the supplied evidence, so urgency should be driven by local-user exposure, L2TP reachability, and whether supported security updates are available.
Technical view
The flaw occurs because an L2TP session can reference its tunnel before registration increments the tunnel reference count. Concurrent session lookup, registration, and teardown can therefore cause a tunnel refcount underflow or expose a session lacking its tunnel pointer. The kernel fix changes when the backpointer is assigned and adds a missing-tunnel check for colliding L2TPv3 session IDs.
Likely exposure
Exposure is limited to Linux systems running an affected kernel where a low-privilege local user can reach the vulnerable L2TP session paths. The supplied version data is irregular and includes commit identifiers, so vulnerability managers should map distribution kernel packages against vendor advisories or the referenced stable fixes rather than rely only on upstream version labels.
Exploitation context
The CVSS vector describes a local, low-complexity attack requiring low privileges and no user interaction, with potentially high confidentiality, integrity, and availability impact. The bundle marks this CVE as absent from KEV and provides no evidence of active exploitation or a public exploit. Exact triggering prerequisites beyond the documented L2TP race are not established here.
Researcher notes
The vulnerable window spans session creation, registration, lookup, and destruction. The correction delays tunnel backpointer assignment, passes encapsulation explicitly while calculating header length, and rejects L2TPv3 lookup results whose tunnel pointer is not yet set. The supplied affected-version list is insufficiently clear for definitive branch-level conclusions; confirm inclusion or backport status through kernel or distribution records.
Mitigation direction
Apply a vendor-supported kernel update containing the referenced upstream fixes.
Confirm distribution backports rather than judging exposure solely by the displayed kernel version.
If patching is delayed, review vendor guidance for safely restricting unused L2TP functionality.
Prioritize multi-user systems where untrusted local accounts or workloads can access L2TP paths.
Validation and detection
Inventory running kernel package versions across Linux hosts.
Compare package changelogs or vendor advisories with CVE-2024-49940 and the referenced commits.
Determine whether L2TP functionality is present and reachable by untrusted local users or workloads.
After updating, verify the patched kernel is running following any required reboot.
Record exceptions where vendor evidence confirms a backport or unaffected build.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-49940 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.