CVE-2023-53020 l2tp: close all race conditions in l2tp_tunnel_register()
A race condition in the Linux kernel's L2TP tunnel registration allows attackers to trigger system crashes or instability.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-53020?
CVE-2023-53020 is a medium-severity vulnerability in Linux kernel, published on 27 Mar 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
l2tp: close all race conditions in l2tp_tunnel_register()
The code in l2tp_tunnel_register() is racy in several ways:
1. It modifies the tunnel socket _after_ publishing it.
2. It calls setup_udp_tunnel_sock() on an existing socket without locking.
3. It changes sock lock class on fly, which triggers many syzbot reports.
This patch amends all of them by moving socket initialization code before publishing and under sock lock. As suggested by Jakub, the l2tp lockdep class is not necessary as we can just switch to bh_lock_sock_nested().
Weakness: CWE-362
Which versions are affected by CVE-2023-53020?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2023-53020?
Apply the vendor's patch.
Is CVE-2023-53020 being exploited?
There is no known exploitation of CVE-2023-53020 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2023-53020, DEBIAN-CVE-2023-53020, GHSA-7fmf-h6vh-qp27, UBUNTU-CVE-2023-53020.