CVE-2024-42232

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-42232
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42232.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-42232
Downstream
Related
Published
2024-08-07T16:15:46Z
Modified
2025-08-09T19:01:28Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

libceph: fix race between delayedwork() and cephmonc_stop()

The way the delayed work is handled in cephmoncstop() is prone to races with monfault() and possibly also finishhunting(). Both of these can requeue the delayed work which wouldn't be canceled by any of the following code in case that happens after canceldelayedworksync() runs -- _closesession() 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 monfault() 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->curmon and monc->hunting as part of closing the session in cephmonc_stop()
  • bail from delayedwork() if monc->curmon is cleared, similar to how it's done in monfault() and finishhunting() (based on monc->hunting)
  • call canceldelayedwork_sync() after the session is closed
References

Affected packages