CVE-2023-54124
published high CVSS 3.1 · 7.8f2fs: fix to drop all dirty pages during umount() if cp_error is set
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxaf697c0f5c5b8798832e651baf23460d588393de to < 92575f05a32dafb16348bfa5e62478118a9be069 · af697c0f5c5b8798832e651baf23460d588393de to < 4ceedc2f8bdffb82e40b7d1bb912304f8e157cb1 · af697c0f5c5b8798832e651baf23460d588393de to < ad87bd313f70b51e48019d5ce2d02d73152356b3 · af697c0f5c5b8798832e651baf23460d588393de to < d8f4ad5f3979dbd8e6251259562f12472717883a · af697c0f5c5b8798832e651baf23460d588393de to < 7741ddc882a0c806a6508ba8203c55a779db7a21 · af697c0f5c5b8798832e651baf23460d588393de to < 82c3d6e9db41cbd3af1d4f90bdb441740b5fad10 · af697c0f5c5b8798832e651baf23460d588393de to < c9b3649a934d131151111354bcbb638076f03a30 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux4.19 (affected) · 0 to < 4.19 (unaffected · semver) · 4.19.284 through 4.19.* (unaffected · semver) · 5.4.244 through 5.4.* (unaffected · semver) · 5.10.181 through 5.10.* (unaffected · semver) · 5.15.113 through 5.15.* (unaffected · semver) · 6.1.30 through 6.1.* (unaffected · semver) · 6.3.4 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: fix to drop all dirty pages during umount() if cp_error is set xfstest generic/361 reports a bug as below: f2fs_bug_on(sbi, sbi->fsync_node_num); kernel BUG at fs/f2fs/super.c:1627! RIP: 0010:f2fs_put_super+0x3a8/0x3b0 Call Trace: generic_shutdown_super+0x8c/0x1b0 kill_block_super+0x2b/0x60 kill_f2fs_super+0x87/0x110 deactivate_locked_super+0x39/0x80 deactivate_super+0x46/0x50 cleanup_mnt+0x109/0x170 __cleanup_mnt+0x16/0x20 task_work_run+0x65/0xa0 exit_to_user_mode_prepare+0x175/0x190 syscall_exit_to_user_mode+0x25/0x50 do_syscall_64+0x4c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc During umount(), if cp_error is set, f2fs_wait_on_all_pages() should not stop waiting all F2FS_WB_CP_DATA pages to be writebacked, otherwise, fsync_node_num can be non-zero after f2fs_wait_on_all_pages() causing this bug. In this case, to avoid deadloop in f2fs_wait_on_all_pages(), it needs to drop all dirty pages rather than redirtying them.
Related advisories
Vendor advisories explicitly linked to this CVE.
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 local filesystem operations — write/fsync on an f2fs volume followed by umount(2) of that mount — with no network component. f2fs is a local block filesystem (Android /data, eMMC/SD/USB media), so the attacker needs local access to the system. AC:L - Both preconditions are attacker-controlled: `CP_ERROR_FLAG` is set deterministically by a crafted image whose metadata reads fail (or by an erroring backing device), and outstanding `F2FS_WB_CP_DATA`/fsync-node pages are trivially produced by a concurrent write+fsync loop before unmount. The condition is reliably reproducible — it is caught by xfstest generic/361. PR:L - The dirty-node-page side requires only an unprivileged user with write access to the f2fs mount; the mount/umount of the crafted volume is routinely available to unprivileged users via udisks2/vold auto-mount, `user`/`users` fstab entries, or removable-media handlers. No real root capability in the init namespace is needed for the realistic attack. UI:N - The attacker performs the mount, the I/O workload, and the umount itself in the auto-mount/removable-media and Android adoptable-storage scenarios; no separate victim action is required. On an already-mounted f2fs volume that hits a device error, the panic occurs at the next unmount without any user involvement. S:U - The corruption and the resulting panic are confined to the kernel of the affected system, with no crossing into a different security authority such as a hypervisor or IOMMU boundary. This is a standard in-kernel filesystem defect. C:H - Skipping the writeback drain lets `f2fs_put_super()` `kfree(sbi)` (and destroy the node manager and checkpoint buffer) while bios whose `bi_private` is that `f2fs_sb_info` are still in flight, so `f2fs_write_end_io()` operates on freed, reallocatable memory. Per kernel UAF guidance, an attacker who reclaims that slab can leverage the stale references for information disclosure. I:H - The same use-after-free provides write primitives into freed memory — `dec_page_count()` atomics, a `list_del()` on `sbi->fsync_node_list` under `sbi->fsync_node_lock`, and `wake_up(&sbi->cp_wait)` — all executed from IRQ context on a reclaimed allocation, which is exploitable for heap corruption. The bug additionally leaves the volume with `SBI_NEED_FSCK` and undropped/redirtied metadata, i.e. on-disk inconsistency. A:H - On `CONFIG_F2FS_CHECK_FS` builds the path terminates in `f2fs_bug_on(sbi, sbi->fsync_node_num)` — an unconditional `BUG_ON()` kernel panic in `f2fs_put_super()`, as shown in the reported trace. Without that config the resulting use-after-free crashes the kernel, and the changelog also notes a potential dead-loop in `f2fs_wait_on_all_pages()` from perpetually redirtied pages.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | af697c0f5c5b8798832e651baf23460d588393de to < 92575f05a32dafb16348bfa5e62478118a9be069 (affected · git)af697c0f5c5b8798832e651baf23460d588393de to < 4ceedc2f8bdffb82e40b7d1bb912304f8e157cb1 (affected · git)af697c0f5c5b8798832e651baf23460d588393de to < ad87bd313f70b51e48019d5ce2d02d73152356b3 (affected · git)af697c0f5c5b8798832e651baf23460d588393de to < d8f4ad5f3979dbd8e6251259562f12472717883a (affected · git)af697c0f5c5b8798832e651baf23460d588393de to < 7741ddc882a0c806a6508ba8203c55a779db7a21 (affected · git)af697c0f5c5b8798832e651baf23460d588393de to < 82c3d6e9db41cbd3af1d4f90bdb441740b5fad10 (affected · git)af697c0f5c5b8798832e651baf23460d588393de to < c9b3649a934d131151111354bcbb638076f03a30 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 4.19 (affected)0 to < 4.19 (unaffected · semver)4.19.284 through 4.19.* (unaffected · semver)5.4.244 through 5.4.* (unaffected · semver)5.10.181 through 5.10.* (unaffected · semver)5.15.113 through 5.15.* (unaffected · semver)6.1.30 through 6.1.* (unaffected · semver)6.3.4 through 6.3.* (unaffected · semver)6.4 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
7- https://git.kernel.org/stable/c/4ceedc2f8bdffb82e40b7d1bb912304f8e157cb1
- https://git.kernel.org/stable/c/7741ddc882a0c806a6508ba8203c55a779db7a21
- https://git.kernel.org/stable/c/82c3d6e9db41cbd3af1d4f90bdb441740b5fad10
- https://git.kernel.org/stable/c/92575f05a32dafb16348bfa5e62478118a9be069
- https://git.kernel.org/stable/c/ad87bd313f70b51e48019d5ce2d02d73152356b3
- https://git.kernel.org/stable/c/c9b3649a934d131151111354bcbb638076f03a30
- https://git.kernel.org/stable/c/d8f4ad5f3979dbd8e6251259562f12472717883a
Provider assertions
1Linux · cna
f2fs: fix to drop all dirty pages during umount() if cp_error is set
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c55d5b2df97a1bc826b2317ff84c494e78fa6596ece198374c703110dd25bf4c
- Ingested
- 23 Sep 2026, 08:15:07 UTC
- Source record
- Official CVE record