# CVE-2025-21678: gtp: Destroy device along with udp socket's netns dismantle.

> 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.33% (percentile 19, 2026-11-26)
- **Published:** 2025-01-31T11:25:39.500Z
- **Modified:** 2026-10-15T01:02:58.241Z

## Who should check

- Anyone running Linux \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< c986380c1d5274c4d5e935addc807d6791cc23eb; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 5f1678346109ff3a6d229d33437fcba3cce9209d; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 036f8d814a2cd11ee8ef62b8f3e7ce5dec0ee4f3; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< efec287cbac92ac6ee8312a89221854760e13b34; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< bb11f992f5a475bc68ef959f17a55306f0328495; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 86f73d4ab2f27deeff22ba9336ad103d94f12ac7; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< eb28fd76c0a08a47b470677c6cef9dd1c60e92d1
- Anyone running Linux 4.7

## Description

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

gtp: Destroy device along with udp socket's netns dismantle.

gtp\_newlink() links the device to a list in dev\_net(dev) instead of
src\_net, where a udp tunnel socket is created.

Even when src\_net is removed, the device stays alive on dev\_net(dev).
Then, removing src\_net triggers the splat below. \[0\]

In this example, gtp0 is created in ns2, and the udp socket is created
in ns1.

  ip netns add ns1
  ip netns add ns2
  ip -n ns1 link add netns ns2 name gtp0 type gtp role sgsn
  ip netns del ns1

Let's link the device to the socket's netns instead.

Now, gtp\_net\_exit\_batch\_rtnl() needs another netdev iteration to remove
all gtp devices in the netns.

\[0\]:
ref\_tracker: net notrefcnt@000000003d6e7d05 has 1/2 users at
     sk\_alloc (./include/net/net\_namespace.h:345 net/core/sock.c:2236)
     inet\_create (net/ipv4/af\_inet.c:326 net/ipv4/af\_inet.c:252)
     \_\_sock\_create (net/socket.c:1558)
     udp\_sock\_create4 (net/ipv4/udp\_tunnel\_core.c:18)
     gtp\_create\_sock (./include/net/udp\_tunnel.h:59 drivers/net/gtp.c:1423)
     gtp\_create\_sockets (drivers/net/gtp.c:1447)
     gtp\_newlink (drivers/net/gtp.c:1507)
     rtnl\_newlink (net/core/rtnetlink.c:3786 net/core/rtnetlink.c:3897 net/core/rtnetlink.c:4012)
     rtnetlink\_rcv\_msg (net/core/rtnetlink.c:6922)
     netlink\_rcv\_skb (net/netlink/af\_netlink.c:2542)
     netlink\_unicast (net/netlink/af\_netlink.c:1321 net/netlink/af\_netlink.c:1347)
     netlink\_sendmsg (net/netlink/af\_netlink.c:1891)
     \_\_\_\_sys\_sendmsg (net/socket.c:711 net/socket.c:726 net/socket.c:2583)
     \_\_\_sys\_sendmsg (net/socket.c:2639)
     \_\_sys\_sendmsg (net/socket.c:2669)
     do\_syscall\_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83)

WARNING: CPU: 1 PID: 60 at lib/ref\_tracker.c:179 ref\_tracker\_dir\_exit (lib/ref\_tracker.c:179)
Modules linked in:
CPU: 1 UID: 0 PID: 60 Comm: kworker/u16:2 Not tainted 6.13.0-rc5-00147-g4c1224501e9d \#5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
Workqueue: netns cleanup\_net
RIP: 0010:ref\_tracker\_dir\_exit (lib/ref\_tracker.c:179)
Code: 00 00 00 fc ff df 4d 8b 26 49 bd 00 01 00 00 00 00 ad de 4c 39 f5 0f 85 df 00 00 00 48 8b 74 24 08 48 89 df e8 a5 cc 12 02 90 \<0f\> 0b 90 48 8d 6b 44 be 04 00 00 00 48 89 ef e8 80 de 67 ff 48 89
RSP: 0018:ff11000009a07b60 EFLAGS: 00010286
RAX: 0000000000002bd3 RBX: ff1100000f4e1aa0 RCX: 1ffffffff0e40ac6
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8423ee3c
RBP: ff1100000f4e1af0 R08: 0000000000000001 R09: fffffbfff0e395ae
R10: 0000000000000001 R11: 0000000000036001 R12: ff1100000f4e1af0
R13: dead000000000100 R14: ff1100000f4e1af0 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ff1100006ce80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9b2464bd98 CR3: 0000000005286005 CR4: 0000000000771ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
 \<TASK\>
 ? \_\_warn (kernel/panic.c:748)
 ? ref\_tracker\_dir\_exit (lib/ref\_tracker.c:179)
 ? report\_bug (lib/bug.c:201 lib/bug.c:219)
 ? handle\_bug (arch/x86/kernel/traps.c:285)
 ? exc\_invalid\_op (arch/x86/kernel/traps.c:309 (discriminator 1))
 ? asm\_exc\_invalid\_op (./arch/x86/include/asm/idtentry.h:621)
 ? \_raw\_spin\_unlock\_irqrestore (./arch/x86/include/asm/irqflags.h:42 ./arch/x86/include/asm/irqflags.h:97 ./arch/x86/include/asm/irqflags.h:155 ./include/linux/spinlock\_api\_smp.h:151 kernel/locking/spinlock.c:194)
 ? ref\_tracker\_dir\_exit (lib/ref\_tracker.c:179)
 ? \_\_pfx\_ref\_tracker\_dir\_exit (lib/ref\_tracker.c:158)
 ? kfree (mm/slub.c:4613 mm/slub.c:4761)
 net\_free (net/core/net\_namespace.c:476 net/core/net\_namespace.c:467)
 cleanup\_net (net/core/net\_namespace.c:664 (discriminator 3))
 process\_one\_work (kernel/workqueue.c:3229)
 worker\_thread (kernel/workqueue.c:3304 kernel/workqueue.c:3391
---truncated---

## Affected and fixed versions

- Linux: \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< c986380c1d5274c4d5e935addc807d6791cc23eb; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 5f1678346109ff3a6d229d33437fcba3cce9209d; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 036f8d814a2cd11ee8ef62b8f3e7ce5dec0ee4f3; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< efec287cbac92ac6ee8312a89221854760e13b34; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< bb11f992f5a475bc68ef959f17a55306f0328495; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 86f73d4ab2f27deeff22ba9336ad103d94f12ac7; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< eb28fd76c0a08a47b470677c6cef9dd1c60e92d1 (cvelist)
- Linux: 4.7 (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-2025-21678. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21678.md
Affected: Linux >= 459aa660eb1d8ce67080da1983bb81d716aa5a69, < c986380c1d5274c4d5e935addc807d6791cc23eb; >= 459aa660eb1d8ce67080da1983bb81d716aa5a69, < 5f1678346109ff3a6d229d33437fcba3cce9209d; >= 459aa660eb1d8ce67080da1983bb81d716aa5a69, < 036f8d814a2cd11ee8ef62b8f3e7ce5dec0ee4f3; >= 459aa660eb1d8ce67080da1…
Fixed in: Linux 5f1678346109ff3a6d229d33437fcba3cce9209d, Linux 036f8d814a2cd11ee8ef62b8f3e7ce5dec0ee4f3, Linux 86f73d4ab2f27deeff22ba9336ad103d94f12ac7

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

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

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

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

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

Linux \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< c986380c1d5274c4d5e935addc807d6791cc23eb; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 5f1678346109ff3a6d229d33437fcba3cce9209d; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 036f8d814a2cd11ee8ef62b8f3e7ce5dec0ee4f3; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< efec287cbac92ac6ee8312a89221854760e13b34; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< bb11f992f5a475bc68ef959f17a55306f0328495; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< 86f73d4ab2f27deeff22ba9336ad103d94f12ac7; \>= 459aa660eb1d8ce67080da1983bb81d716aa5a69, \< eb28fd76c0a08a47b470677c6cef9dd1c60e92d1; Linux 4.7.

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

Yes. Fixed in Linux 5f1678346109ff3a6d229d33437fcba3cce9209d, Linux 036f8d814a2cd11ee8ef62b8f3e7ce5dec0ee4f3, Linux 86f73d4ab2f27deeff22ba9336ad103d94f12ac7. No fix listed yet: follow the vendor advisory.

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

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/c986380c1d5274c4d5e935addc807d6791cc23eb>
- patch: <https://git.kernel.org/stable/c/5f1678346109ff3a6d229d33437fcba3cce9209d>
- patch: <https://git.kernel.org/stable/c/036f8d814a2cd11ee8ef62b8f3e7ce5dec0ee4f3>
- patch: <https://git.kernel.org/stable/c/efec287cbac92ac6ee8312a89221854760e13b34>
- patch: <https://git.kernel.org/stable/c/bb11f992f5a475bc68ef959f17a55306f0328495>
- patch: <https://git.kernel.org/stable/c/86f73d4ab2f27deeff22ba9336ad103d94f12ac7>
- patch: <https://git.kernel.org/stable/c/eb28fd76c0a08a47b470677c6cef9dd1c60e92d1>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-503939.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-21678>

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