Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-49940

HIGH 7.8EPSS 17%

l2tp: prevent possible tunnel refcount underflow

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running Linux >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < aa7132362e79abc4f2add4d8657dd1679341edc5; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 98691b2e28a6c3dac0680914493d54c77f215755; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < f7415e60c25a6108cd7955a20b2e66b6251ffe02; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 24256415d18695b46da06c93135f5b51c548b950; b102bfc2a90d14f342580285782a9a51c74f7369; 10c15ddabbcf888922adbdd44ca3fecf6eab19d9; 8d1c650d452c53fcb3f02a7b1d772741639f89a4; 12b5fb58ac993c24210cf8cbc72d407d3a4e6490; aef37401b467a0b1a9517c69924a1d66937e0789; >= 3.2.99, < 3.3; …
  • Anyone running Linux 4.15

Vulnerability facts

Affected
Linux >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < aa7132362e79abc4f2add4d8657dd1679341edc5; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 98691b2e28a6c3dac0680914493d54c77f215755; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < f7415e60c25a6108cd7955a20b2e66b6251ffe02; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 24256415d18695b46da06c93135f5b51c548b950; b102bfc2a90d14f342580285782a9a51c74f7369; 10c15ddabbcf888922adbdd44ca3fecf6eab19d9; 8d1c650d452c53fcb3f02a7b1d772741639f89a4; 12b5fb58ac993c24210cf8cbc72d407d3a4e6490; aef37401b467a0b1a9517c69924a1d66937e0789; >= 3.2.99, < 3.3; …; Linux 4.15
Fixed in
Linux 98691b2e28a6c3dac0680914493d54c77f215755, Linux 24256415d18695b46da06c93135f5b51c548b950, Linux 3.3
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
EPSS
0.32% chance of exploitation in 30 days (percentile 17, 2026-11-26)
Published
Modified

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 and fixed versions

Package / productAffectedFixedSource
Linux>= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < aa7132362e79abc4f2add4d8657dd1679341edc5; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 98691b2e28a6c3dac0680914493d54c77f215755; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < f7415e60c25a6108cd7955a20b2e66b6251ffe02; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 24256415d18695b46da06c93135f5b51c548b950; b102bfc2a90d14f342580285782a9a51c74f7369; 10c15ddabbcf888922adbdd44ca3fecf6eab19d9; 8d1c650d452c53fcb3f02a7b1d772741639f89a4; 12b5fb58ac993c24210cf8cbc72d407d3a4e6490; aef37401b467a0b1a9517c69924a1d66937e0789; >= 3.2.99, < 3.3; …—cvelist
Linux4.15—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-49940. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-49940.md
Affected: Linux >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < aa7132362e79abc4f2add4d8657dd1679341edc5; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 98691b2e28a6c3dac0680914493d54c77f215755; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < f7415e60c25a6108cd7955a20b2e66b6251ffe02; >= 3953ae7b218df4d1e544b98…
Fixed in: Linux 98691b2e28a6c3dac0680914493d54c77f215755, Linux 24256415d18695b46da06c93135f5b51c548b950, Linux 3.3

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-49940 being exploited?

There is no confirmed exploitation: CVE-2024-49940 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-49940?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2024-49940?

Linux >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < aa7132362e79abc4f2add4d8657dd1679341edc5; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 98691b2e28a6c3dac0680914493d54c77f215755; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < f7415e60c25a6108cd7955a20b2e66b6251ffe02; >= 3953ae7b218df4d1e544b98a393666f9ae58a78c, < 24256415d18695b46da06c93135f5b51c548b950; b102bfc2a90d14f342580285782a9a51c74f7369; 10c15ddabbcf888922adbdd44ca3fecf6eab19d9; 8d1c650d452c53fcb3f02a7b1d772741639f89a4; 12b5fb58ac993c24210cf8cbc72d407d3a4e6490; aef37401b467a0b1a9517c69924a1d66937e0789; >= 3.2.99, < 3.3; …; Linux 4.15.

Is there a fix for CVE-2024-49940?

Yes. Fixed in Linux 98691b2e28a6c3dac0680914493d54c77f215755, Linux 24256415d18695b46da06c93135f5b51c548b950, Linux 3.3. No fix listed yet: follow the vendor advisory.

How do I check if I'm affected by CVE-2024-49940?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors