# CVE-2025-68772: f2fs: fix to avoid updating compression context during writeback

> 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:28:49.924Z
- **Modified:** 2026-06-17T09:59:33.720Z

## Who should check

- Anyone running Linux \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< ad26bfbc085c939b5dca77ff8c14798c06d151c4; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< bcd0086ee5a2e88c1224ff2ec1e4a43c83efe5a0; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 0bf1a02494c7eb5bd43445de4c83c8592e02c4bf; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 0df713a9c082a474c8b0bcf670edc8e98461d5a0; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 10b591e7fb7cdc8c1e53e9c000dc0ef7069aaa76
- Anyone running Linux 5.6

## Description

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

f2fs: fix to avoid updating compression context during writeback

Bai, Shuangpeng \<sjb7183@psu.edu\> reported a bug as below:

Oops: divide error: 0000 \[\#1\] SMP KASAN PTI
CPU: 0 UID: 0 PID: 11441 Comm: syz.0.46 Not tainted 6.17.0 \#1 PREEMPT(full)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:f2fs\_all\_cluster\_page\_ready+0x106/0x550 fs/f2fs/compress.c:857
Call Trace:
 \<TASK\>
 f2fs\_write\_cache\_pages fs/f2fs/data.c:3078 \[inline\]
 \_\_f2fs\_write\_data\_pages fs/f2fs/data.c:3290 \[inline\]
 f2fs\_write\_data\_pages+0x1c19/0x3600 fs/f2fs/data.c:3317
 do\_writepages+0x38e/0x640 mm/page-writeback.c:2634
 filemap\_fdatawrite\_wbc mm/filemap.c:386 \[inline\]
 \_\_filemap\_fdatawrite\_range mm/filemap.c:419 \[inline\]
 file\_write\_and\_wait\_range+0x2ba/0x3e0 mm/filemap.c:794
 f2fs\_do\_sync\_file+0x6e6/0x1b00 fs/f2fs/file.c:294
 generic\_write\_sync include/linux/fs.h:3043 \[inline\]
 f2fs\_file\_write\_iter+0x76e/0x2700 fs/f2fs/file.c:5259
 new\_sync\_write fs/read\_write.c:593 \[inline\]
 vfs\_write+0x7e9/0xe00 fs/read\_write.c:686
 ksys\_write+0x19d/0x2d0 fs/read\_write.c:738
 do\_syscall\_x64 arch/x86/entry/syscall\_64.c:63 \[inline\]
 do\_syscall\_64+0xf7/0x470 arch/x86/entry/syscall\_64.c:94
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

The bug was triggered w/ below race condition:

fsync				setattr			ioctl
- f2fs\_do\_sync\_file
 - file\_write\_and\_wait\_range
  - f2fs\_write\_cache\_pages
  : inode is non-compressed
  : cc.cluster\_size =
    F2FS\_I(inode)-\>i\_cluster\_size = 0
   - tag\_pages\_for\_writeback
				- f2fs\_setattr
				 - truncate\_setsize
				 - f2fs\_truncate
							- f2fs\_fileattr\_set
							 - f2fs\_setflags\_common
							  - set\_compress\_context
							  : F2FS\_I(inode)-\>i\_cluster\_size = 4
							  : set\_inode\_flag(inode, FI\_COMPRESSED\_FILE)
   - f2fs\_compressed\_file
   : return true
   - f2fs\_all\_cluster\_page\_ready
   : "pgidx % cc-\>cluster\_size" trigger dividing 0 issue

Let's change as below to fix this issue:
- introduce a new atomic type variable .writeback in structure f2fs\_inode\_info
to track the number of threads which calling f2fs\_write\_cache\_pages().
- use .i\_sem lock to protect .writeback update.
- check .writeback before update compression context in f2fs\_setflags\_common()
to avoid race w/ -\>writepages.

## Affected and fixed versions

- Linux: \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< ad26bfbc085c939b5dca77ff8c14798c06d151c4; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< bcd0086ee5a2e88c1224ff2ec1e4a43c83efe5a0; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 0bf1a02494c7eb5bd43445de4c83c8592e02c4bf; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 0df713a9c082a474c8b0bcf670edc8e98461d5a0; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 10b591e7fb7cdc8c1e53e9c000dc0ef7069aaa76 (cvelist)
- Linux: 5.6 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-68772.md
Affected: Linux >= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < ad26bfbc085c939b5dca77ff8c14798c06d151c4; >= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < bcd0086ee5a2e88c1224ff2ec1e4a43c83efe5a0; >= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < 0bf1a02494c7eb5bd43445de4c83c8592e02c4bf; >= 4c8ff7095bef64fc47e996a…
Fixed in: Linux 0bf1a02494c7eb5bd43445de4c83c8592e02c4bf, Linux 0df713a9c082a474c8b0bcf670edc8e98461d5a0, Linux 10b591e7fb7cdc8c1e53e9c000dc0ef7069aaa76

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

There is no confirmed exploitation: CVE-2025-68772 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-68772?

It has no CVSS score yet. Unknown.

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

Linux \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< ad26bfbc085c939b5dca77ff8c14798c06d151c4; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< bcd0086ee5a2e88c1224ff2ec1e4a43c83efe5a0; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 0bf1a02494c7eb5bd43445de4c83c8592e02c4bf; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 0df713a9c082a474c8b0bcf670edc8e98461d5a0; \>= 4c8ff7095bef64fc47e996a938f7d57f9e077da3, \< 10b591e7fb7cdc8c1e53e9c000dc0ef7069aaa76; Linux 5.6.

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

Yes. Fixed in Linux 0bf1a02494c7eb5bd43445de4c83c8592e02c4bf, Linux 0df713a9c082a474c8b0bcf670edc8e98461d5a0, Linux 10b591e7fb7cdc8c1e53e9c000dc0ef7069aaa76. Upgrade Linux to 10b591e7fb7cdc8c1e53e9c000dc0ef7069aaa76 or later.

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

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/ad26bfbc085c939b5dca77ff8c14798c06d151c4>
- other: <https://git.kernel.org/stable/c/bcd0086ee5a2e88c1224ff2ec1e4a43c83efe5a0>
- other: <https://git.kernel.org/stable/c/0bf1a02494c7eb5bd43445de4c83c8592e02c4bf>
- other: <https://git.kernel.org/stable/c/0df713a9c082a474c8b0bcf670edc8e98461d5a0>
- other: <https://git.kernel.org/stable/c/10b591e7fb7cdc8c1e53e9c000dc0ef7069aaa76>

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

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