CVE-2023-54182
published high CVSS 3.1 · 7.1f2fs: fix to check readonly condition correctly
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxf824deb54b683165b953371a0529446c723ef6d6 to < e2759a59a4cc96af712084e9db7065c858c4fe9f · f824deb54b683165b953371a0529446c723ef6d6 to < e05d63f8b48aad4613bd582c945bee41e2dd7255 · f824deb54b683165b953371a0529446c723ef6d6 to < da8c535b28696017e5d1532d12ea78e836432d9e · f824deb54b683165b953371a0529446c723ef6d6 to < d78dfefcde9d311284434560d69c0478c55a657e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.2 (affected) · 0 to < 5.2 (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 check readonly condition correctly With below case, it can mount multi-device image w/ rw option, however one of secondary device is set as ro, later update will cause panic, so let's introduce f2fs_dev_is_readonly(), and check multi-devices rw status in f2fs_remount() w/ it in order to avoid such inconsistent mount status. mkfs.f2fs -c /dev/zram1 /dev/zram0 -f blockdev --setro /dev/zram1 mount -t f2fs dev/zram0 /mnt/f2fs mount: /mnt/f2fs: WARNING: source write-protected, mounted read-only. mount -t f2fs -o remount,rw mnt/f2fs dd if=/dev/zero of=/mnt/f2fs/file bs=1M count=8192 kernel BUG at fs/f2fs/inline.c:258! RIP: 0010:f2fs_write_inline_data+0x23e/0x2d0 [f2fs] Call Trace: f2fs_write_single_data_page+0x26b/0x9f0 [f2fs] f2fs_write_cache_pages+0x389/0xa60 [f2fs] __f2fs_write_data_pages+0x26b/0x2d0 [f2fs] f2fs_write_data_pages+0x2e/0x40 [f2fs] do_writepages+0xd3/0x1b0 __writeback_single_inode+0x5b/0x420 writeback_sb_inodes+0x236/0x5a0 __writeback_inodes_wb+0x56/0xf0 wb_writeback+0x2a3/0x490 wb_do_writeback+0x2b2/0x330 wb_workfn+0x6a/0x260 process_one_work+0x270/0x5e0 worker_thread+0x52/0x3e0 kthread+0xf4/0x120 ret_from_fork+0x29/0x50
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.1 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
- Scenarios
- en: AV:L - The vulnerability is reached through local filesystem operations — a mount/remount syscall on a local block device followed by ordinary file writes on the mounted f2fs volume. There is no network-facing component in fs/f2fs/super.c or the writeback path. AC:L - Once a multi-device f2fs volume with a read-only secondary device has been remounted read-write, writing any file larger than MAX_INLINE_DATA deterministically drives f2fs_write_inline_data() into f2fs_bug_on(sbi, page->index) with 100% reliability. There is no race to win and no memory layout to groom. PR:L - The final trigger requires only an unprivileged local user with write access to the mounted filesystem — the inconsistent RW state is created by the kernel wrongly accepting a remount that mount(8) itself flagged as write-protected, which an admin will naturally attempt after seeing the "source write-protected, mounted read-only" warning. No capability is needed to issue the writes that panic the kernel. UI:N - No victim action is needed at exploitation time; the attacker simply writes to a file and the writeback kworker hits the BUG asynchronously. The vulnerable mount state is a pre-existing system condition, not an interaction the attacker must induce. S:U - The impact is confined to the kernel and the affected filesystem within the same security authority — there is no VM, sandbox, or IOMMU boundary crossed. C:N - All data movement in the affected paths (f2fs_do_read_inline_data, f2fs_truncate_inline_inode, f2fs_write_inline_data) is bounded by MAX_INLINE_DATA(inode) inside the inode's own node page, so there is no out-of-bounds read, no uninitialized memory exposure, and no cross-file disclosure. I:H - The inconsistent mount lets f2fs_convert_inline_inode() silently skip conversion, so an inode retains FI_INLINE_DATA while holding data blocks past index 0; the WARN path then memcpy's the wrong page into the inline data area and writes to the read-only member device are rejected by bio_check_ro(), producing on-disk data and metadata corruption, checkpoint errors, and a filesystem flagged SBI_NEED_FSCK. A:H - With CONFIG_F2FS_CHECK_FS the assertion is a hard BUG_ON that panics the kernel from the writeback kworker (the exact "kernel BUG at fs/f2fs/inline.c:258" reported in the fix). Even without it, the resulting I/O failures on the read-only device drive the filesystem into a checkpoint-error state, taking the volume offline.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | f824deb54b683165b953371a0529446c723ef6d6 to < e2759a59a4cc96af712084e9db7065c858c4fe9f (affected · git)f824deb54b683165b953371a0529446c723ef6d6 to < e05d63f8b48aad4613bd582c945bee41e2dd7255 (affected · git)f824deb54b683165b953371a0529446c723ef6d6 to < da8c535b28696017e5d1532d12ea78e836432d9e (affected · git)f824deb54b683165b953371a0529446c723ef6d6 to < d78dfefcde9d311284434560d69c0478c55a657e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.2 (affected)0 to < 5.2 (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
4Provider assertions
1Linux · cna
f2fs: fix to check readonly condition correctly
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d30fe6f66a1b6943edada87e583c3ed2a086e0fc4100501b093f854f5e02fb39
- Ingested
- 23 Sep 2026, 08:15:07 UTC
- Source record
- Official CVE record