{"id":"CVE-2026-139199","state":"PUBLISHED","title":"ceph: fix error handling when the OSD client is stopping in ceph_submit_write()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix error handling when the OSD client is stopping in ceph_submit_write()\n\nWhen ceph_inc_osd_stopping_blocker() fails, ceph_submit_write()\nredirties and unlocks the folios remaining in ceph_wbc->fbatch.\nHowever, none of those folios are locked at this point: locked folios\nwere moved to ceph_wbc->pages[] and removed from the fbatch by\nceph_process_folio_batch(). Unlocking them triggers\nVM_BUG_ON_FOLIO(!folio_test_locked(folio)) in folio_unlock(), or\nunlocks a folio locked by another task.\n\nThis error path also returns -EIO without fully cleaning up the folios in\nceph_wbc->pages[]: their references are never dropped, fscrypt bounce\npages are never freed, the writeback congestion count is never\ndecremented, and the pages array is leaked. ceph_wbc->locked_pages is\nalso left non-zero, so ceph_writepages_start() loops back around and\nhits BUG_ON(ceph_wbc.locked_pages).\n\nLeave the fbatch folios alone, as ceph_writepages_start() drops their\nreferences when releasing the batch, and unwind ceph_wbc->pages[] the\nsame way writepages_finish() would have. Abort writeback in\nceph_writepages_start() instead of continuing, matching the handling\nof ceph_inc_osd_stopping_blocker() failure on entry, as the OSD\nclient is being torn down and further writeback cannot make progress.\n\nAn LLM was used to verify that the cleanup was comprehensive, and\nsuggested aborting the writeback instead of continuing.","publishedAt":"2026-11-30T13:32:29.748Z","updatedAt":"2026-11-30T13:32:29.748Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6f58fab6f7b4f66970ba8f3238bff15792779b03","status":"affected","lessThan":"378d756c3596f3773fb993b3672ac15619401bba","versionType":"git"},{"version":"1551ec61dc551dab1bb40c516a5a096607aff774","status":"affected","lessThan":"1dc76baaf781f6ece49383611788028e73b23fea","versionType":"git"},{"version":"1551ec61dc551dab1bb40c516a5a096607aff774","status":"affected","lessThan":"323d7bbd07594edcc4095c5fd5c00a7f81bb4ac1","versionType":"git"},{"version":"1551ec61dc551dab1bb40c516a5a096607aff774","status":"affected","lessThan":"ad67b498de17b709f050d7ebf84749b1fc6a242d","versionType":"git"},{"version":"6.12.114","status":"affected","lessThan":"6.12.119","versionType":"semver"}],"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":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.12.119","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/378d756c3596f3773fb993b3672ac15619401bba","https://git.kernel.org/stable/c/1dc76baaf781f6ece49383611788028e73b23fea","https://git.kernel.org/stable/c/323d7bbd07594edcc4095c5fd5c00a7f81bb4ac1","https://git.kernel.org/stable/c/ad67b498de17b709f050d7ebf84749b1fc6a242d"],"weaknesses":[],"ingestedAt":"2026-11-30T13:44:05.999Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139199.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139199","state":"PUBLISHED","datePublished":"2026-11-30T13:32:29.748Z","dateUpdated":"2026-11-30T13:32:29.748Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.920Z"},"containers":{"cna":{"title":"ceph: fix error handling when the OSD client is stopping in ceph_submit_write()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix error handling when the OSD client is stopping in ceph_submit_write()\n\nWhen ceph_inc_osd_stopping_blocker() fails, ceph_submit_write()\nredirties and unlocks the folios remaining in ceph_wbc->fbatch.\nHowever, none of those folios are locked at this point: locked folios\nwere moved to ceph_wbc->pages[] and removed from the fbatch by\nceph_process_folio_batch(). Unlocking them triggers\nVM_BUG_ON_FOLIO(!folio_test_locked(folio)) in folio_unlock(), or\nunlocks a folio locked by another task.\n\nThis error path also returns -EIO without fully cleaning up the folios in\nceph_wbc->pages[]: their references are never dropped, fscrypt bounce\npages are never freed, the writeback congestion count is never\ndecremented, and the pages array is leaked. ceph_wbc->locked_pages is\nalso left non-zero, so ceph_writepages_start() loops back around and\nhits BUG_ON(ceph_wbc.locked_pages).\n\nLeave the fbatch folios alone, as ceph_writepages_start() drops their\nreferences when releasing the batch, and unwind ceph_wbc->pages[] the\nsame way writepages_finish() would have. Abort writeback in\nceph_writepages_start() instead of continuing, matching the handling\nof ceph_inc_osd_stopping_blocker() failure on entry, as the OSD\nclient is being torn down and further writeback cannot make progress.\n\nAn LLM was used to verify that the cleanup was comprehensive, and\nsuggested aborting the writeback instead of continuing."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6f58fab6f7b4f66970ba8f3238bff15792779b03","status":"affected","lessThan":"378d756c3596f3773fb993b3672ac15619401bba","versionType":"git"},{"version":"1551ec61dc551dab1bb40c516a5a096607aff774","status":"affected","lessThan":"1dc76baaf781f6ece49383611788028e73b23fea","versionType":"git"},{"version":"1551ec61dc551dab1bb40c516a5a096607aff774","status":"affected","lessThan":"323d7bbd07594edcc4095c5fd5c00a7f81bb4ac1","versionType":"git"},{"version":"1551ec61dc551dab1bb40c516a5a096607aff774","status":"affected","lessThan":"ad67b498de17b709f050d7ebf84749b1fc6a242d","versionType":"git"},{"version":"6.12.114","status":"affected","lessThan":"6.12.119","versionType":"semver"}],"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":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.12.119","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/378d756c3596f3773fb993b3672ac15619401bba"},{"url":"https://git.kernel.org/stable/c/1dc76baaf781f6ece49383611788028e73b23fea"},{"url":"https://git.kernel.org/stable/c/323d7bbd07594edcc4095c5fd5c00a7f81bb4ac1"},{"url":"https://git.kernel.org/stable/c/ad67b498de17b709f050d7ebf84749b1fc6a242d"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:29.748Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.114","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}