CVE-2024-42232: libceph: fix race between delayed_work() and ceph_monc_stop()
In the Linux kernel, the following vulnerability has been resolved:
libceph: fix race between delayed_work() and ceph_monc_stop()
The way the delayed work is handled in ceph_monc_stop() is prone to
races with mon_fault() and possibly also finish_hunting(). Both of
these can requeue the delayed work which wouldn't be canceled by any of
the following code in case that happens after cancel_delayed_work_sync()
runs -- __close_session() doesn't mess with the delayed work in order
to avoid interfering with the hunting interval logic. This part was
missed in commit b5d91704f53e ("libceph: behave in mon_fault() if
cur_mon < 0") and use-after-free can still ensue on monc and objects
that hang off of it, with monc->auth and monc->monmap being
particularly susceptible to quickly being reused.
To fix this:
- clear monc->cur_mon and monc->hunting as part of closing the session
in ceph_monc_stop()
- bail from delayed_work() if monc->cur_mon is cleared, similar to how
it's done in mon_fault() and finish_hunting() (based on monc->hunting)
- call cancel_delayed_work_sync() after the session is closed
Security readout for executives and security teams
Plain-English summary
A Linux Ceph client shutdown can race with scheduled background work, allowing that work to access freed memory. This may cause crashes, memory corruption, or broader compromise. The supplied assessment is CVSS 9.8, but practical risk depends on whether affected libceph functionality is used and triggerable.
Executive priority
Treat remediation as urgent for systems actively using affected Ceph kernel functionality, especially business-critical storage hosts. Quickly establish actual exposure before assuming every Linux server is vulnerable. Patch confirmed affected systems through supported vendor channels and track exceptions until their kernel lineage is verified.
Technical view
A race allows mon_fault() or finish_hunting() to requeue delayed work after ceph_monc_stop() cancels it. The work can then access freed monc state, particularly auth and monmap objects. The fix clears session state, makes delayed work exit when cur_mon is cleared, and cancels work after closing the session.
Likely exposure
Exposure is most likely on Linux systems using affected libceph or Ceph kernel-client functionality. The supplied version data includes multiple kernel releases and fix commits but lacks reliable distribution-package mapping. Custom and vendor kernels require commit or advisory-level verification because fixes may be backported without changing the upstream version.
Exploitation context
The source bundle marks this CVE as absent from KEV, and no cited source claims active exploitation. It provides no public exploit evidence or confirmed attacker-controlled trigger conditions. The network CVSS vector indicates potentially remote reachability, but the supplied technical description alone does not establish a practical remote attack path.
Researcher notes
The record describes a use-after-free caused by teardown and delayed-work synchronization. No CWE is supplied. Exact exploitability, trigger prerequisites, and distribution-specific affected packages are not established. Analysis should focus on kernel lineage, backported commits, active libceph use, and whether untrusted Ceph-side interactions can influence the fault and hunting paths.
Mitigation direction
Apply a vendor-supported kernel update containing the applicable upstream stable fix.
Prioritize systems actively using libceph or Ceph kernel-client functionality.
Match custom kernels against the listed stable fixes, accounting for backports.
Consult the distribution or kernel vendor for temporary mitigation guidance if updating is delayed.
Validation and detection
Inventory kernels on systems using libceph or Ceph kernel-client functionality.
Verify package changelogs or kernel source contains the applicable stable fix.
Confirm the remediated kernel is running, not merely installed.
Review kernel logs and crash telemetry for libceph or monc memory faults.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-42232 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.