# CVE-2025-71065: f2fs: fix to avoid potential deadlock

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.26% (percentile 11, 2026-11-26)
- **Published:** 2026-01-13T15:31:21.235Z
- **Modified:** 2026-06-17T10:03:35.243Z

## Who should check

- Anyone running Linux \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 8bd6dff8b801abaa362272894bda795bf0cf1307; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 6c3bab5c6261aa22c561ef56b7365959a90e7d91; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 86a85a7b622e6e8dba69810257733ce5eab5ed55; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< ca8b201f28547e28343a6f00a6e91fa8c09572fe
- Anyone running Linux 6.1

## Description

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

f2fs: fix to avoid potential deadlock

As Jiaming Zhang and syzbot reported, there is potential deadlock in
f2fs as below:

Chain exists of:
  &sbi-\>cp\_rwsem --\> fs\_reclaim --\> sb\_internal\#2

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(sb\_internal\#2);
                               lock(fs\_reclaim);
                               lock(sb\_internal\#2);
  rlock(&sbi-\>cp\_rwsem);

 \*\*\* DEADLOCK \*\*\*

3 locks held by kswapd0/73:
 \#0: ffffffff8e247a40 (fs\_reclaim){+.+.}-{0:0}, at: balance\_pgdat mm/vmscan.c:7015 \[inline\]
 \#0: ffffffff8e247a40 (fs\_reclaim){+.+.}-{0:0}, at: kswapd+0x951/0x2800 mm/vmscan.c:7389
 \#1: ffff8880118400e0 (&type-\>s\_umount\_key\#50){.+.+}-{4:4}, at: super\_trylock\_shared fs/super.c:562 \[inline\]
 \#1: ffff8880118400e0 (&type-\>s\_umount\_key\#50){.+.+}-{4:4}, at: super\_cache\_scan+0x91/0x4b0 fs/super.c:197
 \#2: ffff888011840610 (sb\_internal\#2){.+.+}-{0:0}, at: f2fs\_evict\_inode+0x8d9/0x1b60 fs/f2fs/inode.c:890

stack backtrace:
CPU: 0 UID: 0 PID: 73 Comm: kswapd0 Not tainted syzkaller \#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
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x189/0x250 lib/dump\_stack.c:120
 print\_circular\_bug+0x2ee/0x310 kernel/locking/lockdep.c:2043
 check\_noncircular+0x134/0x160 kernel/locking/lockdep.c:2175
 check\_prev\_add kernel/locking/lockdep.c:3165 \[inline\]
 check\_prevs\_add kernel/locking/lockdep.c:3284 \[inline\]
 validate\_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908
 \_\_lock\_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237
 lock\_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
 down\_read+0x46/0x2e0 kernel/locking/rwsem.c:1537
 f2fs\_down\_read fs/f2fs/f2fs.h:2278 \[inline\]
 f2fs\_lock\_op fs/f2fs/f2fs.h:2357 \[inline\]
 f2fs\_do\_truncate\_blocks+0x21c/0x10c0 fs/f2fs/file.c:791
 f2fs\_truncate\_blocks+0x10a/0x300 fs/f2fs/file.c:867
 f2fs\_truncate+0x489/0x7c0 fs/f2fs/file.c:925
 f2fs\_evict\_inode+0x9f2/0x1b60 fs/f2fs/inode.c:897
 evict+0x504/0x9c0 fs/inode.c:810
 f2fs\_evict\_inode+0x1dc/0x1b60 fs/f2fs/inode.c:853
 evict+0x504/0x9c0 fs/inode.c:810
 dispose\_list fs/inode.c:852 \[inline\]
 prune\_icache\_sb+0x21b/0x2c0 fs/inode.c:1000
 super\_cache\_scan+0x39b/0x4b0 fs/super.c:224
 do\_shrink\_slab+0x6ef/0x1110 mm/shrinker.c:437
 shrink\_slab\_memcg mm/shrinker.c:550 \[inline\]
 shrink\_slab+0x7ef/0x10d0 mm/shrinker.c:628
 shrink\_one+0x28a/0x7c0 mm/vmscan.c:4955
 shrink\_many mm/vmscan.c:5016 \[inline\]
 lru\_gen\_shrink\_node mm/vmscan.c:5094 \[inline\]
 shrink\_node+0x315d/0x3780 mm/vmscan.c:6081
 kswapd\_shrink\_node mm/vmscan.c:6941 \[inline\]
 balance\_pgdat mm/vmscan.c:7124 \[inline\]
 kswapd+0x147c/0x2800 mm/vmscan.c:7389
 kthread+0x70e/0x8a0 kernel/kthread.c:463
 ret\_from\_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
 ret\_from\_fork\_asm+0x1a/0x30 arch/x86/entry/entry\_64.S:245
 \</TASK\>

The root cause is deadlock among four locks as below:

kswapd
- fs\_reclaim				--- Lock A
 - shrink\_one
  - evict
   - f2fs\_evict\_inode
    - sb\_start\_intwrite			--- Lock B

- iput
 - evict
  - f2fs\_evict\_inode
   - sb\_start\_intwrite			--- Lock B
   - f2fs\_truncate
    - f2fs\_truncate\_blocks
     - f2fs\_do\_truncate\_blocks
      - f2fs\_lock\_op			--- Lock C

ioctl
- f2fs\_ioc\_commit\_atomic\_write
 - f2fs\_lock\_op				--- Lock C
  - \_\_f2fs\_commit\_atomic\_write
   - \_\_replace\_atomic\_write\_block
    - f2fs\_get\_dnode\_of\_data
     - \_\_get\_node\_folio
      - f2fs\_check\_nid\_range
       - f2fs\_handle\_error
        - f2fs\_record\_errors
         - f2fs\_down\_write		--- Lock D

open
- do\_open
 - do\_truncate
  - security\_inode\_need\_killpriv
   - f2fs\_getxattr
    - lookup\_all\_xattrs
     - f2fs\_handle\_error
      - f2fs\_record\_errors
       - f2fs\_down\_write		--- Lock D
        - f2fs\_commit\_super
         - read\_mapping\_folio
          - filemap\_alloc\_folio\_noprof
           - prepare\_alloc\_pages
            - fs\_reclaim\_acquire	--- Lock A

In order to a
---truncated---

## Affected and fixed versions

- Linux: \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 8bd6dff8b801abaa362272894bda795bf0cf1307; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 6c3bab5c6261aa22c561ef56b7365959a90e7d91; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 86a85a7b622e6e8dba69810257733ce5eab5ed55; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< ca8b201f28547e28343a6f00a6e91fa8c09572fe (cvelist)
- Linux: 6.1 (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-71065. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-71065.md
Affected: Linux >= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, < 8bd6dff8b801abaa362272894bda795bf0cf1307; >= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, < 6c3bab5c6261aa22c561ef56b7365959a90e7d91; >= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, < 86a85a7b622e6e8dba69810257733ce5eab5ed55; >= 95fa90c9e5a7f14c2497d5b…
Fixed in: Linux 8bd6dff8b801abaa362272894bda795bf0cf1307, Linux 6c3bab5c6261aa22c561ef56b7365959a90e7d91, Linux 86a85a7b622e6e8dba69810257733ce5eab5ed55

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

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 8bd6dff8b801abaa362272894bda795bf0cf1307; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 6c3bab5c6261aa22c561ef56b7365959a90e7d91; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< 86a85a7b622e6e8dba69810257733ce5eab5ed55; \>= 95fa90c9e5a7f14c2497d5b032544478c9377c3a, \< ca8b201f28547e28343a6f00a6e91fa8c09572fe; Linux 6.1.

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

Yes. Fixed in Linux 8bd6dff8b801abaa362272894bda795bf0cf1307, Linux 6c3bab5c6261aa22c561ef56b7365959a90e7d91, Linux 86a85a7b622e6e8dba69810257733ce5eab5ed55. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/8bd6dff8b801abaa362272894bda795bf0cf1307>
- other: <https://git.kernel.org/stable/c/6c3bab5c6261aa22c561ef56b7365959a90e7d91>
- other: <https://git.kernel.org/stable/c/86a85a7b622e6e8dba69810257733ce5eab5ed55>
- other: <https://git.kernel.org/stable/c/ca8b201f28547e28343a6f00a6e91fa8c09572fe>

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

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