{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-54124",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-24T13:02:52.521Z",
        "datePublished": "2025-12-24T13:06:43.290Z",
        "dateUpdated": "2026-08-05T09:17:25.391Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:17:25.391Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to drop all dirty pages during umount() if cp_error is set\n\nxfstest generic/361 reports a bug as below:\n\nf2fs_bug_on(sbi, sbi->fsync_node_num);\n\nkernel BUG at fs/f2fs/super.c:1627!\nRIP: 0010:f2fs_put_super+0x3a8/0x3b0\nCall Trace:\n generic_shutdown_super+0x8c/0x1b0\n kill_block_super+0x2b/0x60\n kill_f2fs_super+0x87/0x110\n deactivate_locked_super+0x39/0x80\n deactivate_super+0x46/0x50\n cleanup_mnt+0x109/0x170\n __cleanup_mnt+0x16/0x20\n task_work_run+0x65/0xa0\n exit_to_user_mode_prepare+0x175/0x190\n syscall_exit_to_user_mode+0x25/0x50\n do_syscall_64+0x4c/0x90\n entry_SYSCALL_64_after_hwframe+0x72/0xdc\n\nDuring umount(), if cp_error is set, f2fs_wait_on_all_pages() should\nnot stop waiting all F2FS_WB_CP_DATA pages to be writebacked, otherwise,\nfsync_node_num can be non-zero after f2fs_wait_on_all_pages() causing\nthis bug.\n\nIn this case, to avoid deadloop in f2fs_wait_on_all_pages(), it needs\nto drop all dirty pages rather than redirtying them."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "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.\nAC: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.\nPR: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.\nUI: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.\nS: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.\nC: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.\nI: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.\nA: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."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/f2fs/checkpoint.c",
                        "fs/f2fs/data.c"
                    ],
                    "versions": [
                        {
                            "version": "af697c0f5c5b8798832e651baf23460d588393de",
                            "lessThan": "92575f05a32dafb16348bfa5e62478118a9be069",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "af697c0f5c5b8798832e651baf23460d588393de",
                            "lessThan": "4ceedc2f8bdffb82e40b7d1bb912304f8e157cb1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "af697c0f5c5b8798832e651baf23460d588393de",
                            "lessThan": "ad87bd313f70b51e48019d5ce2d02d73152356b3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "af697c0f5c5b8798832e651baf23460d588393de",
                            "lessThan": "d8f4ad5f3979dbd8e6251259562f12472717883a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "af697c0f5c5b8798832e651baf23460d588393de",
                            "lessThan": "7741ddc882a0c806a6508ba8203c55a779db7a21",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "af697c0f5c5b8798832e651baf23460d588393de",
                            "lessThan": "82c3d6e9db41cbd3af1d4f90bdb441740b5fad10",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "af697c0f5c5b8798832e651baf23460d588393de",
                            "lessThan": "c9b3649a934d131151111354bcbb638076f03a30",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/f2fs/checkpoint.c",
                        "fs/f2fs/data.c"
                    ],
                    "versions": [
                        {
                            "version": "4.19",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.19",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.284",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.244",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.181",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.113",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.30",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3.4",
                            "lessThanOrEqual": "6.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "4.19.284"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.4.244"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.10.181"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.15.113"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.1.30"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/92575f05a32dafb16348bfa5e62478118a9be069"
                },
                {
                    "url": "https://git.kernel.org/stable/c/4ceedc2f8bdffb82e40b7d1bb912304f8e157cb1"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ad87bd313f70b51e48019d5ce2d02d73152356b3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d8f4ad5f3979dbd8e6251259562f12472717883a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/7741ddc882a0c806a6508ba8203c55a779db7a21"
                },
                {
                    "url": "https://git.kernel.org/stable/c/82c3d6e9db41cbd3af1d4f90bdb441740b5fad10"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c9b3649a934d131151111354bcbb638076f03a30"
                }
            ],
            "title": "f2fs: fix to drop all dirty pages during umount() if cp_error is set",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}