# CVE-2023-53020: l2tp: close all race conditions in l2tp\_tunnel\_register()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.19% (percentile 5, 2026-11-28)
- **CWE:** CWE-362
- **Published:** 2025-03-27T16:43:47.151Z
- **Modified:** 2026-06-17T06:44:08.110Z

## Who should check

- Anyone running Linux \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 2d77e5c0ad79004b5ef901895437e9cce6dfcc7e; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 77e8ed776cdb1a24b2aab8fe7c6f1f154235e1ce; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< cef0845b6dcfa2f6c2c832e7f9622551456c741d; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 0b2c59720e65885a394a017d0cf9cab118914682
- Anyone running Linux 3.6

## 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().

## Affected and fixed versions

- Linux: \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 2d77e5c0ad79004b5ef901895437e9cce6dfcc7e; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 77e8ed776cdb1a24b2aab8fe7c6f1f154235e1ce; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< cef0845b6dcfa2f6c2c832e7f9622551456c741d; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 0b2c59720e65885a394a017d0cf9cab118914682 (cvelist)
- Linux: 3.6 (cvelist)

## Mitigation

- Upgrade Linux to 0b2c59720e65885a394a017d0cf9cab118914682 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-53020. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53020.md
Affected: Linux >= 37159ef2c1ae1e696b24b260b241209a19f92c60, < 2d77e5c0ad79004b5ef901895437e9cce6dfcc7e; >= 37159ef2c1ae1e696b24b260b241209a19f92c60, < 77e8ed776cdb1a24b2aab8fe7c6f1f154235e1ce; >= 37159ef2c1ae1e696b24b260b241209a19f92c60, < cef0845b6dcfa2f6c2c832e7f9622551456c741d; >= 37159ef2c1ae1e696b24b26…
Fixed in: Linux 2d77e5c0ad79004b5ef901895437e9cce6dfcc7e, Linux 77e8ed776cdb1a24b2aab8fe7c6f1f154235e1ce, Linux 0b2c59720e65885a394a017d0cf9cab118914682

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.
```

## FAQ

### Is CVE-2023-53020 being exploited?

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

### How serious is CVE-2023-53020?

Medium: CVSS 4.7 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-53020?

Linux \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 2d77e5c0ad79004b5ef901895437e9cce6dfcc7e; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 77e8ed776cdb1a24b2aab8fe7c6f1f154235e1ce; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< cef0845b6dcfa2f6c2c832e7f9622551456c741d; \>= 37159ef2c1ae1e696b24b260b241209a19f92c60, \< 0b2c59720e65885a394a017d0cf9cab118914682; Linux 3.6.

### Is there a fix for CVE-2023-53020?

Yes. Fixed in Linux 2d77e5c0ad79004b5ef901895437e9cce6dfcc7e, Linux 77e8ed776cdb1a24b2aab8fe7c6f1f154235e1ce, Linux 0b2c59720e65885a394a017d0cf9cab118914682. Upgrade Linux to 0b2c59720e65885a394a017d0cf9cab118914682 or later.

### How do I check if I'm affected by CVE-2023-53020?

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.

## References

- patch: <https://git.kernel.org/stable/c/2d77e5c0ad79004b5ef901895437e9cce6dfcc7e>
- patch: <https://git.kernel.org/stable/c/77e8ed776cdb1a24b2aab8fe7c6f1f154235e1ce>
- patch: <https://git.kernel.org/stable/c/cef0845b6dcfa2f6c2c832e7f9622551456c741d>
- patch: <https://git.kernel.org/stable/c/0b2c59720e65885a394a017d0cf9cab118914682>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-53020>

HTML: <https://flawdb.com/CVE-2023-53020> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-53020>
