# CVE-2025-21884: net: better track kernel sockets lifetime

> 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.31% (percentile 16, 2026-11-26)
- **Published:** 2025-03-27T14:57:12.486Z
- **Modified:** 2026-10-15T22:18:10.910Z

## Who should check

- Anyone running Linux \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 2668e038800b946d269f96ec1b258c01930a242c; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 4ceb0bd4ffd009821b585ce6a8033b12b59fb5fb; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< c31a732fac46b00b95b78fcc9c37cb48dd6f2e0c; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 5c70eb5c593d64d93b178905da215a9fd288a4b5
- Anyone running Linux 6.2

## Description

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

net: better track kernel sockets lifetime

While kernel sockets are dismantled during pernet\_operations-\>exit(),
their freeing can be delayed by any tx packets still held in qdisc
or device queues, due to skb\_set\_owner\_w() prior calls.

This then trigger the following warning from ref\_tracker\_dir\_exit() \[1\]

To fix this, make sure that kernel sockets own a reference on net-\>passive.

Add sk\_net\_refcnt\_upgrade() helper, used whenever a kernel socket
is converted to a refcounted one.

\[1\]

\[  136.263918\]\[   T35\] ref\_tracker: net notrefcnt@ffff8880638f01e0 has 1/2 users at
\[  136.263918\]\[   T35\]      sk\_alloc+0x2b3/0x370
\[  136.263918\]\[   T35\]      inet6\_create+0x6ce/0x10f0
\[  136.263918\]\[   T35\]      \_\_sock\_create+0x4c0/0xa30
\[  136.263918\]\[   T35\]      inet\_ctl\_sock\_create+0xc2/0x250
\[  136.263918\]\[   T35\]      igmp6\_net\_init+0x39/0x390
\[  136.263918\]\[   T35\]      ops\_init+0x31e/0x590
\[  136.263918\]\[   T35\]      setup\_net+0x287/0x9e0
\[  136.263918\]\[   T35\]      copy\_net\_ns+0x33f/0x570
\[  136.263918\]\[   T35\]      create\_new\_namespaces+0x425/0x7b0
\[  136.263918\]\[   T35\]      unshare\_nsproxy\_namespaces+0x124/0x180
\[  136.263918\]\[   T35\]      ksys\_unshare+0x57d/0xa70
\[  136.263918\]\[   T35\]      \_\_x64\_sys\_unshare+0x38/0x40
\[  136.263918\]\[   T35\]      do\_syscall\_64+0xf3/0x230
\[  136.263918\]\[   T35\]      entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
\[  136.263918\]\[   T35\]
\[  136.343488\]\[   T35\] ref\_tracker: net notrefcnt@ffff8880638f01e0 has 1/2 users at
\[  136.343488\]\[   T35\]      sk\_alloc+0x2b3/0x370
\[  136.343488\]\[   T35\]      inet6\_create+0x6ce/0x10f0
\[  136.343488\]\[   T35\]      \_\_sock\_create+0x4c0/0xa30
\[  136.343488\]\[   T35\]      inet\_ctl\_sock\_create+0xc2/0x250
\[  136.343488\]\[   T35\]      ndisc\_net\_init+0xa7/0x2b0
\[  136.343488\]\[   T35\]      ops\_init+0x31e/0x590
\[  136.343488\]\[   T35\]      setup\_net+0x287/0x9e0
\[  136.343488\]\[   T35\]      copy\_net\_ns+0x33f/0x570
\[  136.343488\]\[   T35\]      create\_new\_namespaces+0x425/0x7b0
\[  136.343488\]\[   T35\]      unshare\_nsproxy\_namespaces+0x124/0x180
\[  136.343488\]\[   T35\]      ksys\_unshare+0x57d/0xa70
\[  136.343488\]\[   T35\]      \_\_x64\_sys\_unshare+0x38/0x40
\[  136.343488\]\[   T35\]      do\_syscall\_64+0xf3/0x230
\[  136.343488\]\[   T35\]      entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

## Affected and fixed versions

- Linux: \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 2668e038800b946d269f96ec1b258c01930a242c; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 4ceb0bd4ffd009821b585ce6a8033b12b59fb5fb; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< c31a732fac46b00b95b78fcc9c37cb48dd6f2e0c; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 5c70eb5c593d64d93b178905da215a9fd288a4b5 (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 5c70eb5c593d64d93b178905da215a9fd288a4b5 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-21884. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21884.md
Affected: Linux >= 0cafd77dcd032d1687efaba5598cf07bce85997f, < 2668e038800b946d269f96ec1b258c01930a242c; >= 0cafd77dcd032d1687efaba5598cf07bce85997f, < 4ceb0bd4ffd009821b585ce6a8033b12b59fb5fb; >= 0cafd77dcd032d1687efaba5598cf07bce85997f, < c31a732fac46b00b95b78fcc9c37cb48dd6f2e0c; >= 0cafd77dcd032d1687efaba…
Fixed in: Linux 2668e038800b946d269f96ec1b258c01930a242c, Linux 4ceb0bd4ffd009821b585ce6a8033b12b59fb5fb, Linux 5c70eb5c593d64d93b178905da215a9fd288a4b5

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

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

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

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

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

Linux \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 2668e038800b946d269f96ec1b258c01930a242c; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 4ceb0bd4ffd009821b585ce6a8033b12b59fb5fb; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< c31a732fac46b00b95b78fcc9c37cb48dd6f2e0c; \>= 0cafd77dcd032d1687efaba5598cf07bce85997f, \< 5c70eb5c593d64d93b178905da215a9fd288a4b5; Linux 6.2.

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

Yes. Fixed in Linux 2668e038800b946d269f96ec1b258c01930a242c, Linux 4ceb0bd4ffd009821b585ce6a8033b12b59fb5fb, Linux 5c70eb5c593d64d93b178905da215a9fd288a4b5. Upgrade Linux to 5c70eb5c593d64d93b178905da215a9fd288a4b5 or later.

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

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/2668e038800b946d269f96ec1b258c01930a242c>
- patch: <https://git.kernel.org/stable/c/4ceb0bd4ffd009821b585ce6a8033b12b59fb5fb>
- patch: <https://git.kernel.org/stable/c/c31a732fac46b00b95b78fcc9c37cb48dd6f2e0c>
- patch: <https://git.kernel.org/stable/c/5c70eb5c593d64d93b178905da215a9fd288a4b5>

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

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