# CVE-2023-52999: net: fix UaF in netns ops registration error path

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **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
- **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.35% (percentile 21, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-03-27T16:43:32.497Z
- **Modified:** 2026-08-05T09:12:19.715Z

## Who should check

- Anyone running Linux \>= 5a2ea549be94924364f6911227d99be86e8cf34a, \< ad0dfe9bcf0d78e699c7efb64c90ed062dc48bea; \>= 97ad240fd9aa9214497d14af2b91608e20856cac, \< ddd49cbbd4c1ceb38032018b589b44208e54f55e; \>= c3edc6e808209aa705185f732e682a370981ced1, \< d4c008f3b7f7d4ffd311eb2dae5e75b3cbddacd0; \>= a1e18acb0246bfb001b08b8b1b830b5ec92a0f13, \< 66689a72ba73575e76d4f6a8748d3fa2690ec1c4; \>= d266935ac43d57586e311a087510fe6a084af742, \< 12075708f2e77ee6a9f8bb2cf512c38be3099794; \>= d266935ac43d57586e311a087510fe6a084af742, \< 71ab9c3e2253619136c31c89dbb2c69305cc89b1; 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5; \>= 4.19.264, \< 4.19.272; \>= 5.4.223, \< 5.4.231; \>= 5.10.153, \< 5.10.166; …
- Anyone running Linux 6.1

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: fix UaF in netns ops registration error path

If net\_assign\_generic() fails, the current error path in ops\_init() tries
to clear the gen pointer slot. Anyway, in such error path, the gen pointer
itself has not been modified yet, and the existing and accessed one is
smaller than the accessed index, causing an out-of-bounds error:

 BUG: KASAN: slab-out-of-bounds in ops\_init+0x2de/0x320
 Write of size 8 at addr ffff888109124978 by task modprobe/1018

 CPU: 2 PID: 1018 Comm: modprobe Not tainted 6.2.0-rc2.mptcp\_ae5ac65fbed5+ \#1641
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.1-2.fc37 04/01/2014
 Call Trace:
  \<TASK\>
  dump\_stack\_lvl+0x6a/0x9f
  print\_address\_description.constprop.0+0x86/0x2b5
  print\_report+0x11b/0x1fb
  kasan\_report+0x87/0xc0
  ops\_init+0x2de/0x320
  register\_pernet\_operations+0x2e4/0x750
  register\_pernet\_subsys+0x24/0x40
  tcf\_register\_action+0x9f/0x560
  do\_one\_initcall+0xf9/0x570
  do\_init\_module+0x190/0x650
  load\_module+0x1fa5/0x23c0
  \_\_do\_sys\_finit\_module+0x10d/0x1b0
  do\_syscall\_64+0x58/0x80
  entry\_SYSCALL\_64\_after\_hwframe+0x72/0xdc
 RIP: 0033:0x7f42518f778d
 Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48
       89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \<48\> 3d 01 f0 ff
       ff 73 01 c3 48 8b 0d cb 56 2c 00 f7 d8 64 89 01 48
 RSP: 002b:00007fff96869688 EFLAGS: 00000246 ORIG\_RAX: 0000000000000139
 RAX: ffffffffffffffda RBX: 00005568ef7f7c90 RCX: 00007f42518f778d
 RDX: 0000000000000000 RSI: 00005568ef41d796 RDI: 0000000000000003
 RBP: 00005568ef41d796 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000
 R13: 00005568ef7f7d30 R14: 0000000000040000 R15: 0000000000000000
  \</TASK\>

This change addresses the issue by skipping the gen pointer
de-reference in the mentioned error-path.

Found by code inspection and verified with explicit error injection
on a kasan-enabled kernel.

## Affected and fixed versions

- Linux: \>= 5a2ea549be94924364f6911227d99be86e8cf34a, \< ad0dfe9bcf0d78e699c7efb64c90ed062dc48bea; \>= 97ad240fd9aa9214497d14af2b91608e20856cac, \< ddd49cbbd4c1ceb38032018b589b44208e54f55e; \>= c3edc6e808209aa705185f732e682a370981ced1, \< d4c008f3b7f7d4ffd311eb2dae5e75b3cbddacd0; \>= a1e18acb0246bfb001b08b8b1b830b5ec92a0f13, \< 66689a72ba73575e76d4f6a8748d3fa2690ec1c4; \>= d266935ac43d57586e311a087510fe6a084af742, \< 12075708f2e77ee6a9f8bb2cf512c38be3099794; \>= d266935ac43d57586e311a087510fe6a084af742, \< 71ab9c3e2253619136c31c89dbb2c69305cc89b1; 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5; \>= 4.19.264, \< 4.19.272; \>= 5.4.223, \< 5.4.231; \>= 5.10.153, \< 5.10.166; … (cvelist)
- Linux: 6.1 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52999.md
Affected: Linux >= 5a2ea549be94924364f6911227d99be86e8cf34a, < ad0dfe9bcf0d78e699c7efb64c90ed062dc48bea; >= 97ad240fd9aa9214497d14af2b91608e20856cac, < ddd49cbbd4c1ceb38032018b589b44208e54f55e; >= c3edc6e808209aa705185f732e682a370981ced1, < d4c008f3b7f7d4ffd311eb2dae5e75b3cbddacd0; >= a1e18acb0246bfb001b08b8…
Fixed in: Linux 66689a72ba73575e76d4f6a8748d3fa2690ec1c4, Linux 12075708f2e77ee6a9f8bb2cf512c38be3099794, Linux 71ab9c3e2253619136c31c89dbb2c69305cc89b1, Linux 4.19.272, Linux 5.4.231, Linux 5.10.166

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-52999 being exploited?

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

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

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

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

Linux \>= 5a2ea549be94924364f6911227d99be86e8cf34a, \< ad0dfe9bcf0d78e699c7efb64c90ed062dc48bea; \>= 97ad240fd9aa9214497d14af2b91608e20856cac, \< ddd49cbbd4c1ceb38032018b589b44208e54f55e; \>= c3edc6e808209aa705185f732e682a370981ced1, \< d4c008f3b7f7d4ffd311eb2dae5e75b3cbddacd0; \>= a1e18acb0246bfb001b08b8b1b830b5ec92a0f13, \< 66689a72ba73575e76d4f6a8748d3fa2690ec1c4; \>= d266935ac43d57586e311a087510fe6a084af742, \< 12075708f2e77ee6a9f8bb2cf512c38be3099794; \>= d266935ac43d57586e311a087510fe6a084af742, \< 71ab9c3e2253619136c31c89dbb2c69305cc89b1; 4a4df5e78712de39d6f90d6a64b5eb48dca03bd5; \>= 4.19.264, \< 4.19.272; \>= 5.4.223, \< 5.4.231; \>= 5.10.153, \< 5.10.166; …; Linux 6.1.

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

Yes. Fixed in Linux 66689a72ba73575e76d4f6a8748d3fa2690ec1c4, Linux 12075708f2e77ee6a9f8bb2cf512c38be3099794, Linux 71ab9c3e2253619136c31c89dbb2c69305cc89b1, Linux 4.19.272, Linux 5.4.231, Linux 5.10.166. No fix listed yet: follow the vendor advisory.

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

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/ad0dfe9bcf0d78e699c7efb64c90ed062dc48bea>
- patch: <https://git.kernel.org/stable/c/ddd49cbbd4c1ceb38032018b589b44208e54f55e>
- patch: <https://git.kernel.org/stable/c/d4c008f3b7f7d4ffd311eb2dae5e75b3cbddacd0>
- patch: <https://git.kernel.org/stable/c/66689a72ba73575e76d4f6a8748d3fa2690ec1c4>
- patch: <https://git.kernel.org/stable/c/12075708f2e77ee6a9f8bb2cf512c38be3099794>
- patch: <https://git.kernel.org/stable/c/71ab9c3e2253619136c31c89dbb2c69305cc89b1>

## 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-52999>

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