First published: Mon Oct 21 2024(Updated: )
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.
Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Software | Affected Version | How to fix |
---|---|---|
Linux Kernel | <6.11.3 | |
debian/linux | <=5.10.223-1<=5.10.226-1<=6.1.123-1<=6.1.128-1 | 6.12.12-1 6.12.15-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2024-49940 is categorized as a medium-severity vulnerability in the Linux kernel.
To fix CVE-2024-49940, users should update their Linux kernel to versions 6.12.12-1 or 6.12.15-1, or to applicable Debian package versions.
CVE-2024-49940 affects various versions of the Linux kernel prior to 6.12.12-1 and specific Debian packages.
CVE-2024-49940 is a reference counting issue that can potentially lead to a tunnel refcount underflow.
While CVE-2024-49940 primarily affects local sessions, an attacker with session control may exploit it, making proper security measures essential.