CVE-2026-139199

ceph: fix error handling when the OSD client is stopping in ceph_submit_write()

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ceph: fix error handling when the OSD client is stopping in ceph_submit_write()

When ceph_inc_osd_stopping_blocker() fails, ceph_submit_write()
redirties and unlocks the folios remaining in ceph_wbc->fbatch.
However, none of those folios are locked at this point: locked folios
were moved to ceph_wbc->pages[] and removed from the fbatch by
ceph_process_folio_batch(). Unlocking them triggers
VM_BUG_ON_FOLIO(!folio_test_locked(folio)) in folio_unlock(), or
unlocks a folio locked by another task.

This error path also returns -EIO without fully cleaning up the folios in
ceph_wbc->pages[]: their references are never dropped, fscrypt bounce
pages are never freed, the writeback congestion count is never
decremented, and the pages array is leaked. ceph_wbc->locked_pages is
also left non-zero, so ceph_writepages_start() loops back around and
hits BUG_ON(ceph_wbc.locked_pages).

Leave the fbatch folios alone, as ceph_writepages_start() drops their
references when releasing the batch, and unwind ceph_wbc->pages[] the
same way writepages_finish() would have. Abort writeback in
ceph_writepages_start() instead of continuing, matching the handling
of ceph_inc_osd_stopping_blocker() failure on entry, as the OSD
client is being torn down and further writeback cannot make progress.

An LLM was used to verify that the cleanup was comprehensive, and
suggested aborting the writeback instead of continuing.

Analysis

AI-generated

Technical impact

A defect in the Linux kernel’s Ceph OSD client causes improper error handling when the client is stopping. During a failure in ceph_inc_osd_stopping_blocker(), ceph_submit_write() attempts to unlock folios that are no longer locked, triggering a VM_BUG_ON_FOLIO or BUG_ON in the kernel. The bug also leaks references and pages, leaving internal counters in an inconsistent state. The result is a kernel panic that can terminate the affected node and disrupt workload availability.

Affected Systems

All Linux kernel builds that include the Ceph OSD subsystem are potentially affected until a patch is applied. The CVE does not specify a particular kernel release, so any version compiled with Ceph support that does not contain the fix commits is vulnerable.

Risk and Exploitability

Although no CVSS score is listed, the kernel bug that results in a crash represents a high‑severity denial of service. The EPSS score is not available and the vulnerability is not currently listed in CISA’s KEV catalog, implying no widespread exploitation is known. The attack is likely local or requires attacker control of Ceph OSD operations. Because the bug triggers a kernel panic when a stopping event occurs, an attacker who can influence OSD client shutdowns could force system downtime.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the Ceph OSD fix commits (see the provided Git references).
  • If an immediate kernel upgrade is not possible, avoid abruptly stopping Ceph OSD clients; keep them running during maintenance windows to prevent the trigger condition.
  • Monitor kernel logs for BUG_ON or VM_BUG_ON messages and investigate any unexpected Ceph OSD shutdowns promptly.

Generated by OpenCVE AI on November 30, 2026 at 20:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-665
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ceph: fix error handling when the OSD client is stopping in ceph_submit_write() When ceph_inc_osd_stopping_blocker() fails, ceph_submit_write() redirties and unlocks the folios remaining in ceph_wbc->fbatch. However, none of those folios are locked at this point: locked folios were moved to ceph_wbc->pages[] and removed from the fbatch by ceph_process_folio_batch(). Unlocking them triggers VM_BUG_ON_FOLIO(!folio_test_locked(folio)) in folio_unlock(), or unlocks a folio locked by another task. This error path also returns -EIO without fully cleaning up the folios in ceph_wbc->pages[]: their references are never dropped, fscrypt bounce pages are never freed, the writeback congestion count is never decremented, and the pages array is leaked. ceph_wbc->locked_pages is also left non-zero, so ceph_writepages_start() loops back around and hits BUG_ON(ceph_wbc.locked_pages). Leave the fbatch folios alone, as ceph_writepages_start() drops their references when releasing the batch, and unwind ceph_wbc->pages[] the same way writepages_finish() would have. Abort writeback in ceph_writepages_start() instead of continuing, matching the handling of ceph_inc_osd_stopping_blocker() failure on entry, as the OSD client is being torn down and further writeback cannot make progress. An LLM was used to verify that the cleanup was comprehensive, and suggested aborting the writeback instead of continuing.
Title ceph: fix error handling when the OSD client is stopping in ceph_submit_write()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM