Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2023-54068

published high CVSS 3.1 · 7.8

f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages()

Published
24 Dec 2025, 12:23:12 UTC
Updated
05 Aug 2026, 09:16:55 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < a8226a45b2a9ce83ba7a167a387a00fecc319e71 · 4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < 169134da419cb8ffbe3b0743bc24573e16952ea9 · 4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < 6604df2a9d07ba8f8fb1ac14046c2c83776faa4f · 4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < 9940877c4fe752923a53f0f7372f2f152b6eccf0 · 4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < ad31eed06c3b4d63b2d38322a271d4009aee4bb3 · 4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < babedcbac164cec970872b8097401ca913a80e61 · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.6 (affected) · 0 to < 5.6 (unaffected · semver) · 5.10.180 through 5.10.* (unaffected · semver) · 5.15.111 through 5.15.* (unaffected · semver) · 6.1.28 through 6.1.* (unaffected · semver) · 6.2.15 through 6.2.* (unaffected · semver) · 6.3.2 through 6.3.* (unaffected · semver) · 6.4 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages() BUG_ON() will be triggered when writing files concurrently, because the same page is writtenback multiple times. 1597 void folio_end_writeback(struct folio *folio) 1598 { ...... 1618 if (!__folio_end_writeback(folio)) 1619 BUG(); ...... 1625 } kernel BUG at mm/filemap.c:1619! Call Trace: <TASK> f2fs_write_end_io+0x1a0/0x370 blk_update_request+0x6c/0x410 blk_mq_end_request+0x15/0x130 blk_complete_reqs+0x3c/0x50 __do_softirq+0xb8/0x29b ? sort_range+0x20/0x20 run_ksoftirqd+0x19/0x20 smpboot_thread_fn+0x10b/0x1d0 kthread+0xde/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 </TASK> Below is the concurrency scenario: [Process A] [Process B] [Process C] f2fs_write_raw_pages() - redirty_page_for_writepage() - unlock page() f2fs_do_write_data_page() - lock_page() - clear_page_dirty_for_io() - set_page_writeback() [1st writeback] ..... - unlock page() generic_perform_write() - f2fs_write_begin() - wait_for_stable_page() - f2fs_write_end() - set_page_dirty() - lock_page() - f2fs_do_write_data_page() - set_page_writeback() [2st writeback] This problem was introduced by the previous commit 7377e853967b ("f2fs: compress: fix potential deadlock of compress file"). All pagelocks were released in f2fs_write_raw_pages(), but whether the page was in the writeback state was ignored in the subsequent writing process. Let's fix it by waiting for the page to writeback before writing.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The bug is reached through ordinary local file I/O on a compression-enabled f2fs inode — buffered write(2)/mmap dirtying plus fsync/sync_file_range driving writeback into `f2fs_write_raw_pages()` (fs/f2fs/compress.c:1456). No network or adjacent-network protocol handler touches this path. AC:L - The attacker owns every side of the race: one thread enters `f2fs_write_raw_pages()` (guaranteed by writing incompressible/partial-cluster data so `cluster_may_compress()` fails), a second thread issues concurrent writeback of the same page after it was redirtied and unlocked, and a third re-dirties the page via `generic_perform_write()`; the loop can be retried indefinitely, and the reporters hit it with ordinary concurrent file writes on shipping devices. PR:L - Only an unprivileged local account with write access to a file on an f2fs mount is needed — `f2fs_setflags_common()` lets any file owner set F2FS_COMPR_FL via FS_IOC_SETFLAGS, and `compress_extension=` mount options set it automatically for app files on Android /data. No capability check exists on the write, fsync, or writeback paths. UI:N - The attacker performs all three roles itself with its own threads on its own file; the f2fs volume is already mounted at boot on Android/embedded systems, so no victim action is required at any point. S:U - The damage is confined to kernel page-cache state, f2fs on-disk structures, and the kernel managing them — the same security authority. No VM, hypervisor, or IOMMU boundary is crossed. C:H - The first I/O completion clears PG_writeback while the second bio over the same page is still in flight, and PG_writeback is the only thing pinning a writeback page (`bio_add_page()` takes no reference), so the page can be truncated, reclaimed, and reused while the device still DMAs from it — writing arbitrary reused kernel page contents into the attacker's file blocks, which it can then read back. I:H - The same broken invariant makes `f2fs_write_end_io()` run `clear_page_private_gcing()`/`end_page_writeback()` on a folio that may already be freed and heap-sprayed, a write into reclaimed memory; additionally two concurrent out-of-place writes of the same page index race in `f2fs_update_data_blkaddr()`/`f2fs_invalidate_blocks()`, leaving stale or cross-linked blocks and persistent on-disk corruption requiring fsck. A:H - The documented outcome is `BUG()` at mm/filemap.c:1619 in `folio_end_writeback()` reached from `f2fs_write_end_io()` in softirq/block-completion context — a fatal exception in interrupt context that panics the machine, and on an Android or embedded device whose userdata is f2fs it is trivially repeatable.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < a8226a45b2a9ce83ba7a167a387a00fecc319e71 (affected · git)4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < 169134da419cb8ffbe3b0743bc24573e16952ea9 (affected · git)4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < 6604df2a9d07ba8f8fb1ac14046c2c83776faa4f (affected · git)4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < 9940877c4fe752923a53f0f7372f2f152b6eccf0 (affected · git)4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < ad31eed06c3b4d63b2d38322a271d4009aee4bb3 (affected · git)4c8ff7095bef64fc47e996a938f7d57f9e077da3 to < babedcbac164cec970872b8097401ca913a80e61 (affected · git)Default: unaffected Linux · cna
Linux Linux 5.6 (affected)0 to < 5.6 (unaffected · semver)5.10.180 through 5.10.* (unaffected · semver)5.15.111 through 5.15.* (unaffected · semver)6.1.28 through 6.1.* (unaffected · semver)6.2.15 through 6.2.* (unaffected · semver)6.3.2 through 6.3.* (unaffected · semver)6.4 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

6

Provider assertions

1

Linux · cna

f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages()

Provenance

Schema
5.2
Searchable
yes
Content hash
0941bee044eb721a90ebc150222cf4596e934b7a88d0afb930e7f534a14e0826
Ingested
23 Sep 2026, 08:15:07 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected