{"id":"CVE-2026-139198","state":"PUBLISHED","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.","publishedAt":"2026-11-30T13:32:29.198Z","updatedAt":"2026-11-30T13:32:29.198Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"50144d879dd560f8159bd2693c27117682831cea","versionType":"git"},{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"ae64bc161e68feb6b83a331db45af372e02f3470","versionType":"git"},{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"c335168835626e75adb726a35b82d0c50abe16d1","versionType":"git"},{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"3f7655f0d9186656c6f1cbc012a39c866d4aaabf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ceph/addr.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.17","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ceph/addr.c"]}],"references":["https://git.kernel.org/stable/c/50144d879dd560f8159bd2693c27117682831cea","https://git.kernel.org/stable/c/ae64bc161e68feb6b83a331db45af372e02f3470","https://git.kernel.org/stable/c/c335168835626e75adb726a35b82d0c50abe16d1","https://git.kernel.org/stable/c/3f7655f0d9186656c6f1cbc012a39c866d4aaabf"],"weaknesses":[],"ingestedAt":"2026-11-30T13:44:05.999Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139198.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139198","state":"PUBLISHED","datePublished":"2026-11-30T13:32:29.198Z","dateUpdated":"2026-11-30T13:32:29.198Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.919Z"},"containers":{"cna":{"title":"ceph: wait for pending fscache write in write_folio_nounlock()","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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"50144d879dd560f8159bd2693c27117682831cea","versionType":"git"},{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"ae64bc161e68feb6b83a331db45af372e02f3470","versionType":"git"},{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"c335168835626e75adb726a35b82d0c50abe16d1","versionType":"git"},{"version":"1702e79734104d711a84ff55bd6a93c21947bc01","status":"affected","lessThan":"3f7655f0d9186656c6f1cbc012a39c866d4aaabf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ceph/addr.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.17","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ceph/addr.c"]}],"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"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:29.198Z"},"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"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}