{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-53838",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-09T01:27:17.826Z",
        "datePublished": "2025-12-09T01:29:54.419Z",
        "dateUpdated": "2026-08-05T09:16:21.177Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:16:21.177Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: synchronize atomic write aborts\n\nTo fix a race condition between atomic write aborts, I use the inode\nlock and make COW inode to be re-usable thoroughout the whole\natomic file inode lifetime."
                }
            ],
            "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 race is driven entirely through local syscalls — `ioctl(F2FS_IOC_START_ATOMIC_WRITE/ABORT_ATOMIC_WRITE)` and `close()` — on a file residing on a mounted f2fs filesystem. No network or physical access is involved.\nAC:L - The attacker owns both sides of the race: it issues the unlocked `->release` abort from its own `close()` in one thread while issuing the `inode_lock`-held abort ioctl from another, and can retry the loop indefinitely at no cost. The `inode_lock` provides no exclusion against the release path, so the window is wide and deterministic to hit.\nPR:L - `__f2fs_ioctl` gates the atomic-write ioctls only on `inode_owner_or_capable()`, which any unprivileged local user satisfies for a file they created on an f2fs mount (e.g. any Android app under /data). No capability, mount option, or crafted image is required.\nUI:N - The attacker performs every step itself — create file, start atomic write, race close against the abort ioctl. No victim action or cooperating process is needed; f2fs simply being mounted is an environmental default, not user interaction.\nS:U - The corruption stays within the kernel's own security authority — a freed `struct inode` in `f2fs_inode_cachep`. There is no VM, IOMMU, or sandbox boundary crossed.\nC:H - The double `iput()` frees the COW `struct inode` while another thread still dereferences it, and `prepare_atomic_write_begin()` continues reading through the dangling `fi->cow_inode`. Reclaiming the freed slot with attacker-groomed objects gives an arbitrary kernel read primitive and leaks the contents of adjacent inodes.\nI:H - The losing thread performs `clear_bit()` and a dirty-list insertion into freed memory plus a second `iput()`, producing a double-free and refcount underflow on an inode object that embeds `i_op`, `i_fop`, and `a_ops` function-pointer tables — a classic write/control-flow-hijack primitive, alongside on-disk metadata corruption from the double evict.\nA:H - Even unexploited, the race yields inode refcount underflow, slab double-free, list corruption, and NULL/wild-pointer dereference via `F2FS_I(NULL)->flags`, all of which oops or panic the kernel. The attacker can trigger it repeatedly from an unprivileged loop."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/f2fs/file.c",
                        "fs/f2fs/inode.c",
                        "fs/f2fs/segment.c",
                        "fs/f2fs/super.c"
                    ],
                    "versions": [
                        {
                            "version": "3db1de0e582c358dd013f3703cd55b5fe4076436",
                            "lessThan": "102b82708c1523b36d421cb8687746906069bc17",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3db1de0e582c358dd013f3703cd55b5fe4076436",
                            "lessThan": "b7724360714642099cec907f54f42e55f5325453",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3db1de0e582c358dd013f3703cd55b5fe4076436",
                            "lessThan": "a46bebd502fe1a3bd1d22f64cedd93e7e7702693",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6db52f1944417c2601182a591a704e2f119c5215",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5.18.18",
                            "lessThan": "5.19",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/f2fs/file.c",
                        "fs/f2fs/inode.c",
                        "fs/f2fs/segment.c",
                        "fs/f2fs/super.c"
                    ],
                    "versions": [
                        {
                            "version": "5.19",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.19",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.18",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.2.5",
                            "lessThanOrEqual": "6.2.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3",
                            "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": "5.19",
                                    "versionEndExcluding": "6.1.18"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.19",
                                    "versionEndExcluding": "6.2.5"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.19",
                                    "versionEndExcluding": "6.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18.18"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/102b82708c1523b36d421cb8687746906069bc17"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b7724360714642099cec907f54f42e55f5325453"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a46bebd502fe1a3bd1d22f64cedd93e7e7702693"
                }
            ],
            "title": "f2fs: synchronize atomic write aborts",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}