# CVE-2025-21642: mptcp: sysctl: sched: avoid using current-\>nsproxy

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; 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.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-01-19T10:17:59.081Z
- **Modified:** 2026-06-17T08:43:54.957Z

## Who should check

- Anyone running Linux \>= daad878a509d69da1761106cb48c091dfe9d522d, \< c0e394fd6b887e84da17e38aaa6c1c104f9c86c2; \>= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, \< 6035702381c35a8f16757332381e58b348a9eaf9; \>= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, \< d38e26e36206ae3d544d496513212ae931d1da0a; 1e444f5f2a07844354ad767b44ed0a713211e26d; \>= 6.6.31, \< 6.6.72; \>= 6.8.10, \< 6.9
- Anyone running Linux 6.9

## Description

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

mptcp: sysctl: sched: avoid using current-\>nsproxy

Using the 'net' structure via 'current' is not recommended for different
reasons.

First, if the goal is to use it to read or write per-netns data, this is
inconsistent with how the "generic" sysctl entries are doing: directly
by only using pointers set to the table entry, e.g. table-\>data. Linked
to that, the per-netns data should always be obtained from the table
linked to the netns it had been created for, which may not coincide with
the reader's or writer's netns.

Another reason is that access to current-\>nsproxy-\>netns can oops if
attempted when current-\>nsproxy had been dropped when the current task
is exiting. This is what syzbot found, when using acct(2):

  Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 \[\#1\] PREEMPT SMP KASAN PTI
  KASAN: null-ptr-deref in range \[0x0000000000000028-0x000000000000002f\]
  CPU: 1 UID: 0 PID: 5924 Comm: syz-executor Not tainted 6.13.0-rc5-syzkaller-00004-gccb98ccef0e5 \#0
  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
  RIP: 0010:proc\_scheduler+0xc6/0x3c0 net/mptcp/ctrl.c:125
  Code: 03 42 80 3c 38 00 0f 85 fe 02 00 00 4d 8b a4 24 08 09 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 7c 24 28 48 89 fa 48 c1 ea 03 \<80\> 3c 02 00 0f 85 cc 02 00 00 4d 8b 7c 24 28 48 8d 84 24 c8 00 00
  RSP: 0018:ffffc900034774e8 EFLAGS: 00010206

  RAX: dffffc0000000000 RBX: 1ffff9200068ee9e RCX: ffffc90003477620
  RDX: 0000000000000005 RSI: ffffffff8b08f91e RDI: 0000000000000028
  RBP: 0000000000000001 R08: ffffc90003477710 R09: 0000000000000040
  R10: 0000000000000040 R11: 00000000726f7475 R12: 0000000000000000
  R13: ffffc90003477620 R14: ffffc90003477710 R15: dffffc0000000000
  FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 00007fee3cd452d8 CR3: 000000007d116000 CR4: 00000000003526f0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  Call Trace:
   \<TASK\>
   proc\_sys\_call\_handler+0x403/0x5d0 fs/proc/proc\_sysctl.c:601
   \_\_kernel\_write\_iter+0x318/0xa80 fs/read\_write.c:612
   \_\_kernel\_write+0xf6/0x140 fs/read\_write.c:632
   do\_acct\_process+0xcb0/0x14a0 kernel/acct.c:539
   acct\_pin\_kill+0x2d/0x100 kernel/acct.c:192
   pin\_kill+0x194/0x7c0 fs/fs\_pin.c:44
   mnt\_pin\_kill+0x61/0x1e0 fs/fs\_pin.c:81
   cleanup\_mnt+0x3ac/0x450 fs/namespace.c:1366
   task\_work\_run+0x14e/0x250 kernel/task\_work.c:239
   exit\_task\_work include/linux/task\_work.h:43 \[inline\]
   do\_exit+0xad8/0x2d70 kernel/exit.c:938
   do\_group\_exit+0xd3/0x2a0 kernel/exit.c:1087
   get\_signal+0x2576/0x2610 kernel/signal.c:3017
   arch\_do\_signal\_or\_restart+0x90/0x7e0 arch/x86/kernel/signal.c:337
   exit\_to\_user\_mode\_loop kernel/entry/common.c:111 \[inline\]
   exit\_to\_user\_mode\_prepare include/linux/entry-common.h:329 \[inline\]
   \_\_syscall\_exit\_to\_user\_mode\_work kernel/entry/common.c:207 \[inline\]
   syscall\_exit\_to\_user\_mode+0x150/0x2a0 kernel/entry/common.c:218
   do\_syscall\_64+0xda/0x250 arch/x86/entry/common.c:89
   entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
  RIP: 0033:0x7fee3cb87a6a
  Code: Unable to access opcode bytes at 0x7fee3cb87a40.
  RSP: 002b:00007fffcccac688 EFLAGS: 00000202 ORIG\_RAX: 0000000000000037
  RAX: 0000000000000000 RBX: 00007fffcccac710 RCX: 00007fee3cb87a6a
  RDX: 0000000000000041 RSI: 0000000000000000 RDI: 0000000000000003
  RBP: 0000000000000003 R08: 00007fffcccac6ac R09: 00007fffcccacac7
  R10: 00007fffcccac710 R11: 0000000000000202 R12: 00007fee3cd49500
  R13: 00007fffcccac6ac R14: 0000000000000000 R15: 00007fee3cd4b000
   \</TASK\>
  Modules linked in:
  ---\[ end trace 0000000000000000 \]---
  RIP: 0010:proc\_scheduler+0xc6/0x3c0 net/mptcp/ctrl.c:125
  Code: 03 42 80 3c 38 00 0f 85 fe 02 00 00 4d 8b a4 24 08 09 00 00 48 b8 00 00 00 00 00 fc
---truncated---

## Affected and fixed versions

- Linux: \>= daad878a509d69da1761106cb48c091dfe9d522d, \< c0e394fd6b887e84da17e38aaa6c1c104f9c86c2; \>= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, \< 6035702381c35a8f16757332381e58b348a9eaf9; \>= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, \< d38e26e36206ae3d544d496513212ae931d1da0a; 1e444f5f2a07844354ad767b44ed0a713211e26d; \>= 6.6.31, \< 6.6.72; \>= 6.8.10, \< 6.9 (cvelist)
- Linux: 6.9 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-21642.md
Affected: Linux >= daad878a509d69da1761106cb48c091dfe9d522d, < c0e394fd6b887e84da17e38aaa6c1c104f9c86c2; >= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, < 6035702381c35a8f16757332381e58b348a9eaf9; >= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, < d38e26e36206ae3d544d496513212ae931d1da0a; 1e444f5f2a07844354ad767b44…
Fixed in: Linux 6035702381c35a8f16757332381e58b348a9eaf9, Linux 6.6.72, Linux 6.9

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

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

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

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

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

Linux \>= daad878a509d69da1761106cb48c091dfe9d522d, \< c0e394fd6b887e84da17e38aaa6c1c104f9c86c2; \>= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, \< 6035702381c35a8f16757332381e58b348a9eaf9; \>= 6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8, \< d38e26e36206ae3d544d496513212ae931d1da0a; 1e444f5f2a07844354ad767b44ed0a713211e26d; \>= 6.6.31, \< 6.6.72; \>= 6.8.10, \< 6.9; Linux 6.9.

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

Yes. Fixed in Linux 6035702381c35a8f16757332381e58b348a9eaf9, Linux 6.6.72, Linux 6.9. Upgrade Linux to 6.9 or later.

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

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/c0e394fd6b887e84da17e38aaa6c1c104f9c86c2>
- patch: <https://git.kernel.org/stable/c/6035702381c35a8f16757332381e58b348a9eaf9>
- patch: <https://git.kernel.org/stable/c/d38e26e36206ae3d544d496513212ae931d1da0a>

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

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