{"api_version":"1","generated_at":"2026-12-02T02:38:45+00:00","cve":"CVE-2026-139198","urls":{"html":"https://cve.report/CVE-2026-139198","api":"https://cve.report/api/cve/CVE-2026-139198.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139198","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139198"},"summary":{"title":"ceph: wait for pending fscache write in write_folio_nounlock()","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:39","updated_at":"2026-12-01 06:17:38"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/c335168835626e75adb726a35b82d0c50abe16d1","name":"https://git.kernel.org/stable/c/c335168835626e75adb726a35b82d0c50abe16d1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/50144d879dd560f8159bd2693c27117682831cea","name":"https://git.kernel.org/stable/c/50144d879dd560f8159bd2693c27117682831cea","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3f7655f0d9186656c6f1cbc012a39c866d4aaabf","name":"https://git.kernel.org/stable/c/3f7655f0d9186656c6f1cbc012a39c866d4aaabf","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ae64bc161e68feb6b83a331db45af372e02f3470","name":"https://git.kernel.org/stable/c/ae64bc161e68feb6b83a331db45af372e02f3470","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139198","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139198","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1702e79734104d711a84ff55bd6a93c21947bc01 50144d879dd560f8159bd2693c27117682831cea git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1702e79734104d711a84ff55bd6a93c21947bc01 ae64bc161e68feb6b83a331db45af372e02f3470 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1702e79734104d711a84ff55bd6a93c21947bc01 c335168835626e75adb726a35b82d0c50abe16d1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1702e79734104d711a84ff55bd6a93c21947bc01 3f7655f0d9186656c6f1cbc012a39c866d4aaabf git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.17","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.17 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.120 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"139198","cve":"CVE-2026-139198","epss":"0.001650000","percentile":"0.059840000","score_date":"2026-12-01","updated_at":"2026-12-02 00:13:40"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/ceph/addr.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"50144d879dd560f8159bd2693c27117682831cea","status":"affected","version":"1702e79734104d711a84ff55bd6a93c21947bc01","versionType":"git"},{"lessThan":"ae64bc161e68feb6b83a331db45af372e02f3470","status":"affected","version":"1702e79734104d711a84ff55bd6a93c21947bc01","versionType":"git"},{"lessThan":"c335168835626e75adb726a35b82d0c50abe16d1","status":"affected","version":"1702e79734104d711a84ff55bd6a93c21947bc01","versionType":"git"},{"lessThan":"3f7655f0d9186656c6f1cbc012a39c866d4aaabf","status":"affected","version":"1702e79734104d711a84ff55bd6a93c21947bc01","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/ceph/addr.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.17"},{"lessThan":"5.17","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.120","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.120","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"5.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"5.17","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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":{"baseScore":7,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"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."}]}],"providerMetadata":{"dateUpdated":"2026-12-01T05:41:45.903Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139198","datePublished":"2026-11-30T13:32:29.198Z","dateReserved":"2026-11-30T13:22:15.919Z","dateUpdated":"2026-12-01T05:41:45.903Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:39","lastModifiedDate":"2026-12-01 06:17:38","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139198","Ordinal":"1","Title":"ceph: wait for pending fscache write in write_folio_nounlock()","CVE":"CVE-2026-139198","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139198","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"ceph: wait for pending fscache write in write_folio_nounlock()"}]}}}