# CVE-2025-38139: netfs: Fix oops in write-retry from mis-resetting the subreq iterator

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

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; 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:** Remote, no login needed
- **EPSS:** 0.68% (percentile 47, 2026-11-28)
- **CWE:** CWE-125
- **Published:** 2025-07-03T08:35:41.271Z
- **Modified:** 2026-08-05T11:59:50.138Z

## Who should check

- Anyone running Linux \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< e0fefe9bc07e6101fdc57abda3644f296c114e31; \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< bd0edaf99a920b1a9decd773179caacacb61d0fd; \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< 4481f7f2b3df123ec77e828c849138f75cff2bf2
- Anyone running Linux 6.12

## Description

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

netfs: Fix oops in write-retry from mis-resetting the subreq iterator

Fix the resetting of the subrequest iterator in netfs\_retry\_write\_stream()
to use the iterator-reset function as the iterator may have been shortened
by a previous retry.  In such a case, the amount of data to be written by
the subrequest is not "subreq-\>len" but "subreq-\>len -
subreq-\>transferred".

Without this, KASAN may see an error in iov\_iter\_revert():

   BUG: KASAN: slab-out-of-bounds in iov\_iter\_revert lib/iov\_iter.c:633 \[inline\]
   BUG: KASAN: slab-out-of-bounds in iov\_iter\_revert+0x443/0x5a0 lib/iov\_iter.c:611
   Read of size 4 at addr ffff88802912a0b8 by task kworker/u32:7/1147

   CPU: 1 UID: 0 PID: 1147 Comm: kworker/u32:7 Not tainted 6.15.0-rc6-syzkaller-00052-g9f35e33144ae \#0 PREEMPT(full)
   Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
   Workqueue: events\_unbound netfs\_write\_collection\_worker
   Call Trace:
    \<TASK\>
    \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
    dump\_stack\_lvl+0x116/0x1f0 lib/dump\_stack.c:120
    print\_address\_description mm/kasan/report.c:408 \[inline\]
    print\_report+0xc3/0x670 mm/kasan/report.c:521
    kasan\_report+0xe0/0x110 mm/kasan/report.c:634
    iov\_iter\_revert lib/iov\_iter.c:633 \[inline\]
    iov\_iter\_revert+0x443/0x5a0 lib/iov\_iter.c:611
    netfs\_retry\_write\_stream fs/netfs/write\_retry.c:44 \[inline\]
    netfs\_retry\_writes+0x166d/0x1a50 fs/netfs/write\_retry.c:231
    netfs\_collect\_write\_results fs/netfs/write\_collect.c:352 \[inline\]
    netfs\_write\_collection\_worker+0x23fd/0x3830 fs/netfs/write\_collect.c:374
    process\_one\_work+0x9cf/0x1b70 kernel/workqueue.c:3238
    process\_scheduled\_works kernel/workqueue.c:3319 \[inline\]
    worker\_thread+0x6c8/0xf10 kernel/workqueue.c:3400
    kthread+0x3c2/0x780 kernel/kthread.c:464
    ret\_from\_fork+0x45/0x80 arch/x86/kernel/process.c:153
    ret\_from\_fork\_asm+0x1a/0x30 arch/x86/entry/entry\_64.S:245
    \</TASK\>

## Affected and fixed versions

- Linux: \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< e0fefe9bc07e6101fdc57abda3644f296c114e31; \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< bd0edaf99a920b1a9decd773179caacacb61d0fd; \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< 4481f7f2b3df123ec77e828c849138f75cff2bf2 (cvelist)
- Linux: 6.12 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-38139.md
Affected: Linux >= cd0277ed0c188dd40e7744e89299af7b78831ca4, < e0fefe9bc07e6101fdc57abda3644f296c114e31; >= cd0277ed0c188dd40e7744e89299af7b78831ca4, < bd0edaf99a920b1a9decd773179caacacb61d0fd; >= cd0277ed0c188dd40e7744e89299af7b78831ca4, < 4481f7f2b3df123ec77e828c849138f75cff2bf2; Linux 6.12
Fixed in: Linux 4481f7f2b3df123ec77e828c849138f75cff2bf2

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

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

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

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

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

Linux \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< e0fefe9bc07e6101fdc57abda3644f296c114e31; \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< bd0edaf99a920b1a9decd773179caacacb61d0fd; \>= cd0277ed0c188dd40e7744e89299af7b78831ca4, \< 4481f7f2b3df123ec77e828c849138f75cff2bf2; Linux 6.12.

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

Yes. Fixed in Linux 4481f7f2b3df123ec77e828c849138f75cff2bf2. Upgrade Linux to 4481f7f2b3df123ec77e828c849138f75cff2bf2 or later.

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

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/e0fefe9bc07e6101fdc57abda3644f296c114e31>
- patch: <https://git.kernel.org/stable/c/bd0edaf99a920b1a9decd773179caacacb61d0fd>
- patch: <https://git.kernel.org/stable/c/4481f7f2b3df123ec77e828c849138f75cff2bf2>

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

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