Linux · Linux Kernel · CVE-2024-42232
**Name of the Vulnerable Software and Affected Versions**
Linux kernel (affected versions not specified)
**Description**
The issue is related to a race condition between `delayed work()` and `ceph monc stop()` in the Linux kernel, specifically in the `libceph` module. This race condition can lead to a use-after-free scenario, particularly affecting `monc->auth` and `monc->monmap`. The problem arises because ` close session()` does not interfere with the delayed work to avoid disrupting the hunting interval logic, but this omission allows `mon fault()` and possibly `finish hunting()` to requeue the delayed work after `cancel delayed work sync()` has run, leading to potential use-after-free issues.
**Recommendations**
- 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.
At the moment, there is no information about a newer version that contains a fix for this vulnerability.