# CVE-2025-21858: geneve: Fix use-after-free in geneve\_find\_dev().

> 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.32% (percentile 18, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-03-12T09:42:11.343Z
- **Modified:** 2026-10-15T02:17:38.807Z

## Who should check

- Anyone running Linux \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< d5e86e27de0936f3cb0a299ce519d993e9cf3886; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 5a0538ac6826807d6919f6aecbb8996c2865af2c; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< f74f6560146714241c6e167b03165ee77a86e316; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 904e746b2e7fa952ab8801b303ce826a63153d78; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 3ce92ca990cfac88a87c61df3cc0b5880e688ecf; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< da9b0ae47f084014b1e4b3f31f70a0defd047ff3; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 788dbca056a8783ec063da3c9d49a3a71c76c283; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 9593172d93b9f91c362baec4643003dc29802929
- Anyone running Linux 4.2

## Description

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

geneve: Fix use-after-free in geneve\_find\_dev().

syzkaller reported a use-after-free in geneve\_find\_dev() \[0\]
without repro.

geneve\_configure() links struct geneve\_dev.next to
net\_generic(net, geneve\_net\_id)-\>geneve\_list.

The net here could differ from dev\_net(dev) if IFLA\_NET\_NS\_PID,
IFLA\_NET\_NS\_FD, or IFLA\_TARGET\_NETNSID is set.

When dev\_net(dev) is dismantled, geneve\_exit\_batch\_rtnl() finally
calls unregister\_netdevice\_queue() for each dev in the netns,
and later the dev is freed.

However, its geneve\_dev.next is still linked to the backend UDP
socket netns.

Then, use-after-free will occur when another geneve dev is created
in the netns.

Let's call geneve\_dellink() instead in geneve\_destroy\_tunnels().

\[0\]:
BUG: KASAN: slab-use-after-free in geneve\_find\_dev drivers/net/geneve.c:1295 \[inline\]
BUG: KASAN: slab-use-after-free in geneve\_configure+0x234/0x858 drivers/net/geneve.c:1343
Read of size 2 at addr ffff000054d6ee24 by task syz.1.4029/13441

CPU: 1 UID: 0 PID: 13441 Comm: syz.1.4029 Not tainted 6.13.0-g0ad9617c78ac \#24 dc35ca22c79fb82e8e7bc5c9c9adafea898b1e3d
Hardware name: linux,dummy-virt (DT)
Call trace:
 show\_stack+0x38/0x50 arch/arm64/kernel/stacktrace.c:466 (C)
 \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
 dump\_stack\_lvl+0xbc/0x108 lib/dump\_stack.c:120
 print\_address\_description mm/kasan/report.c:378 \[inline\]
 print\_report+0x16c/0x6f0 mm/kasan/report.c:489
 kasan\_report+0xc0/0x120 mm/kasan/report.c:602
 \_\_asan\_report\_load2\_noabort+0x20/0x30 mm/kasan/report\_generic.c:379
 geneve\_find\_dev drivers/net/geneve.c:1295 \[inline\]
 geneve\_configure+0x234/0x858 drivers/net/geneve.c:1343
 geneve\_newlink+0xb8/0x128 drivers/net/geneve.c:1634
 rtnl\_newlink\_create+0x23c/0x868 net/core/rtnetlink.c:3795
 \_\_rtnl\_newlink net/core/rtnetlink.c:3906 \[inline\]
 rtnl\_newlink+0x1054/0x1630 net/core/rtnetlink.c:4021
 rtnetlink\_rcv\_msg+0x61c/0x918 net/core/rtnetlink.c:6911
 netlink\_rcv\_skb+0x1dc/0x398 net/netlink/af\_netlink.c:2543
 rtnetlink\_rcv+0x34/0x50 net/core/rtnetlink.c:6938
 netlink\_unicast\_kernel net/netlink/af\_netlink.c:1322 \[inline\]
 netlink\_unicast+0x618/0x838 net/netlink/af\_netlink.c:1348
 netlink\_sendmsg+0x5fc/0x8b0 net/netlink/af\_netlink.c:1892
 sock\_sendmsg\_nosec net/socket.c:713 \[inline\]
 \_\_sock\_sendmsg net/socket.c:728 \[inline\]
 \_\_\_\_sys\_sendmsg+0x410/0x6f8 net/socket.c:2568
 \_\_\_sys\_sendmsg+0x178/0x1d8 net/socket.c:2622
 \_\_sys\_sendmsg net/socket.c:2654 \[inline\]
 \_\_do\_sys\_sendmsg net/socket.c:2659 \[inline\]
 \_\_se\_sys\_sendmsg net/socket.c:2657 \[inline\]
 \_\_arm64\_sys\_sendmsg+0x12c/0x1c8 net/socket.c:2657
 \_\_invoke\_syscall arch/arm64/kernel/syscall.c:35 \[inline\]
 invoke\_syscall+0x90/0x278 arch/arm64/kernel/syscall.c:49
 el0\_svc\_common+0x13c/0x250 arch/arm64/kernel/syscall.c:132
 do\_el0\_svc+0x54/0x70 arch/arm64/kernel/syscall.c:151
 el0\_svc+0x4c/0xa8 arch/arm64/kernel/entry-common.c:744
 el0t\_64\_sync\_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762
 el0t\_64\_sync+0x198/0x1a0 arch/arm64/kernel/entry.S:600

Allocated by task 13247:
 kasan\_save\_stack mm/kasan/common.c:47 \[inline\]
 kasan\_save\_track+0x30/0x68 mm/kasan/common.c:68
 kasan\_save\_alloc\_info+0x44/0x58 mm/kasan/generic.c:568
 poison\_kmalloc\_redzone mm/kasan/common.c:377 \[inline\]
 \_\_kasan\_kmalloc+0x84/0xa0 mm/kasan/common.c:394
 kasan\_kmalloc include/linux/kasan.h:260 \[inline\]
 \_\_do\_kmalloc\_node mm/slub.c:4298 \[inline\]
 \_\_kmalloc\_node\_noprof+0x2a0/0x560 mm/slub.c:4304
 \_\_kvmalloc\_node\_noprof+0x9c/0x230 mm/util.c:645
 alloc\_netdev\_mqs+0xb8/0x11a0 net/core/dev.c:11470
 rtnl\_create\_link+0x2b8/0xb50 net/core/rtnetlink.c:3604
 rtnl\_newlink\_create+0x19c/0x868 net/core/rtnetlink.c:3780
 \_\_rtnl\_newlink net/core/rtnetlink.c:3906 \[inline\]
 rtnl\_newlink+0x1054/0x1630 net/core/rtnetlink.c:4021
 rtnetlink\_rcv\_msg+0x61c/0x918 net/core/rtnetlink.c:6911
 netlink\_rcv\_skb+0x1dc/0x398 net/netlink/af\_netlink.c:2543
 rtnetlink\_rcv+0x34/0x50 net/core/rtnetlink.c:6938
 netlink\_unicast\_kernel net/netlink/af\_n
---truncated---

## Affected and fixed versions

- Linux: \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< d5e86e27de0936f3cb0a299ce519d993e9cf3886; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 5a0538ac6826807d6919f6aecbb8996c2865af2c; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< f74f6560146714241c6e167b03165ee77a86e316; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 904e746b2e7fa952ab8801b303ce826a63153d78; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 3ce92ca990cfac88a87c61df3cc0b5880e688ecf; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< da9b0ae47f084014b1e4b3f31f70a0defd047ff3; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 788dbca056a8783ec063da3c9d49a3a71c76c283; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 9593172d93b9f91c362baec4643003dc29802929 (cvelist)
- Linux: 4.2 (cvelist)

## Mitigation

- Upgrade Linux to 9593172d93b9f91c362baec4643003dc29802929 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-21858.md
Affected: Linux >= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, < d5e86e27de0936f3cb0a299ce519d993e9cf3886; >= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, < 5a0538ac6826807d6919f6aecbb8996c2865af2c; >= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, < f74f6560146714241c6e167b03165ee77a86e316; >= 2d07dc79fe04a43d82a346c…
Fixed in: Linux 5a0538ac6826807d6919f6aecbb8996c2865af2c, Linux 904e746b2e7fa952ab8801b303ce826a63153d78, Linux 3ce92ca990cfac88a87c61df3cc0b5880e688ecf, Linux 788dbca056a8783ec063da3c9d49a3a71c76c283, Linux 9593172d93b9f91c362baec4643003dc29802929

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-2025-21858 being exploited?

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

### How serious is CVE-2025-21858?

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

### Which versions are affected by CVE-2025-21858?

Linux \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< d5e86e27de0936f3cb0a299ce519d993e9cf3886; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 5a0538ac6826807d6919f6aecbb8996c2865af2c; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< f74f6560146714241c6e167b03165ee77a86e316; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 904e746b2e7fa952ab8801b303ce826a63153d78; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 3ce92ca990cfac88a87c61df3cc0b5880e688ecf; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< da9b0ae47f084014b1e4b3f31f70a0defd047ff3; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 788dbca056a8783ec063da3c9d49a3a71c76c283; \>= 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b, \< 9593172d93b9f91c362baec4643003dc29802929; Linux 4.2.

### Is there a fix for CVE-2025-21858?

Yes. Fixed in Linux 5a0538ac6826807d6919f6aecbb8996c2865af2c, Linux 904e746b2e7fa952ab8801b303ce826a63153d78, Linux 3ce92ca990cfac88a87c61df3cc0b5880e688ecf, Linux 788dbca056a8783ec063da3c9d49a3a71c76c283, Linux 9593172d93b9f91c362baec4643003dc29802929. Upgrade Linux to 9593172d93b9f91c362baec4643003dc29802929 or later.

### How do I check if I'm affected by CVE-2025-21858?

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/d5e86e27de0936f3cb0a299ce519d993e9cf3886>
- patch: <https://git.kernel.org/stable/c/5a0538ac6826807d6919f6aecbb8996c2865af2c>
- patch: <https://git.kernel.org/stable/c/f74f6560146714241c6e167b03165ee77a86e316>
- patch: <https://git.kernel.org/stable/c/904e746b2e7fa952ab8801b303ce826a63153d78>
- patch: <https://git.kernel.org/stable/c/3ce92ca990cfac88a87c61df3cc0b5880e688ecf>
- patch: <https://git.kernel.org/stable/c/da9b0ae47f084014b1e4b3f31f70a0defd047ff3>
- patch: <https://git.kernel.org/stable/c/788dbca056a8783ec063da3c9d49a3a71c76c283>
- patch: <https://git.kernel.org/stable/c/9593172d93b9f91c362baec4643003dc29802929>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## 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-2025-21858>

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