CVE-2024-49940
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/10/2024
Last modified:
13/11/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
l2tp: prevent possible tunnel refcount underflow<br />
<br />
When a session is created, it sets a backpointer to its tunnel. When<br />
the session refcount drops to 0, l2tp_session_free drops the tunnel<br />
refcount if session->tunnel is non-NULL. However, session->tunnel is<br />
set in l2tp_session_create, before the tunnel refcount is incremented<br />
by l2tp_session_register, which leaves a small window where<br />
session->tunnel is non-NULL when the tunnel refcount hasn&#39;t been<br />
bumped.<br />
<br />
Moving the assignment to l2tp_session_register is trivial but<br />
l2tp_session_create calls l2tp_session_set_header_len which uses<br />
session->tunnel to get the tunnel&#39;s encap. Add an encap arg to<br />
l2tp_session_set_header_len to avoid using session->tunnel.<br />
<br />
If l2tpv3 sessions have colliding IDs, it is possible for<br />
l2tp_v3_session_get to race with l2tp_session_register and fetch a<br />
session which doesn&#39;t yet have session->tunnel set. Add a check for<br />
this case.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.11.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



