{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139198",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.919Z",
        "datePublished": "2026-11-30T13:32:29.198Z",
        "dateUpdated": "2026-12-01T05:41:45.903Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-01T05:41:45.903Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nceph: wait for pending fscache write in write_folio_nounlock()\n\nwrite_folio_nounlock() marks the folio with PG_private_2 via\nceph_set_page_fscache() and starts an async write to the cache via\nceph_fscache_write_to_cache(). PG_private_2 is only cleared once that\nwrite completes.\n\nIf the OSD write fails, the error paths return without waiting for the\ncache write. On retry, ceph_find_incompatible() would wait for\nwriteback, but not for PG_private_2, before calling\nwrite_folio_nounlock() again, which would trip the VM_BUG_ON_FOLIO() in\nfolio_start_private_2().\n\nWait for any pending cache write before starting writeback on the\nfolio. Do so before bumping the writeback congestion count and\nallocating the possibly mempool-backed OSD request, so that a thread\nsleeping on the cache I/O does not hold either while it waits.\nAdd ceph_folio_wait_fscache(), a wrapper for folio_wait_private_2(), and\nuse it."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The double folio_start_private_2() happens in write_folio_nounlock(), called only from ceph_find_incompatible() during a local write() (netfs_write_begin check_write_begin hook) or an mmap write fault (ceph_page_mkwrite). The retry it needs comes from a local SIGKILL (-ERESTARTSYS in ceph_osdc_wait_request), and no OSD or MDS message supplies the bad state.\nAC:H - The bug needs a CONFIG_CEPH_FSCACHE kernel with an fsc mount and cachefilesd, plus a folio left dirty under an older snapshot context that is the oldest. The second write_folio_nounlock() must also start before the first cachefiles write, whose latency the attacker does not control, runs fscache_wreq_done().\nPR:L - Any local user who can write to a file on an existing cephfs fsc mount can drive ceph_find_incompatible() and SIGKILL their own writer. Mounting ceph needs init-namespace CAP_SYS_ADMIN (ceph_fs_type has no FS_USERNS_MOUNT), so the attacker relies on an existing mount.\nUI:N - No victim action is needed; the attacker issues the writes, the SIGKILL and the truncate against their own file on an already-mounted filesystem.\nS:U - The corruption stays in kernel page-cache folio refcounts inside the same kernel security authority; no guest/host or other boundary is crossed.\nC:H - Without DEBUG_VM the second start takes an extra folio ref and sets an already-set bit. The first completion clears PG_private_2 early, so truncate frees the folio, and __fscache_clear_page_bits() walks i_pages by index and puts whatever folio is now there: a page-cache use-after-free that can expose freed page contents.\nI:H - The unbalanced folio_end_private_2() put on a newly inserted folio frees a page that is still mapped in the page cache, a page-level use-after-free whose reuse lets the attacker write to memory reallocated for other kernel or user data.\nA:H - With CONFIG_DEBUG_VM, folio_start_private_2() hits VM_BUG_ON_FOLIO(folio_test_private_2) and the kernel BUGs. Without it, the folio refcount imbalance leads to a page-cache use-after-free and crashes."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ceph/addr.c"
                    ],
                    "versions": [
                        {
                            "version": "1702e79734104d711a84ff55bd6a93c21947bc01",
                            "lessThan": "50144d879dd560f8159bd2693c27117682831cea",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1702e79734104d711a84ff55bd6a93c21947bc01",
                            "lessThan": "ae64bc161e68feb6b83a331db45af372e02f3470",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1702e79734104d711a84ff55bd6a93c21947bc01",
                            "lessThan": "c335168835626e75adb726a35b82d0c50abe16d1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1702e79734104d711a84ff55bd6a93c21947bc01",
                            "lessThan": "3f7655f0d9186656c6f1cbc012a39c866d4aaabf",
                            "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/ceph/addr.c"
                    ],
                    "versions": [
                        {
                            "version": "5.17",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.17",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.120",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.65",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.6",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "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.17",
                                    "versionEndExcluding": "6.12.120"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "6.18.65"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "7.3.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.17",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/50144d879dd560f8159bd2693c27117682831cea"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ae64bc161e68feb6b83a331db45af372e02f3470"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c335168835626e75adb726a35b82d0c50abe16d1"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3f7655f0d9186656c6f1cbc012a39c866d4aaabf"
                }
            ],
            "title": "ceph: wait for pending fscache write in write_folio_nounlock()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}