CVE-2024-42232

Source
https://cve.org/CVERecord?id=CVE-2024-42232
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-42232.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-42232
Downstream
Related
Published
2024-08-07T15:14:23.074Z
Modified
2026-03-11T07:44:08.420197492Z
Summary
libceph: fix race between delayed_work() and ceph_monc_stop()
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 canceldelayedwork_sync() 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 curmon < 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
Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42232.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0e04dc26cc594d31ee6b1382b452b6bc83b57937
Fixed
1177afeca833174ba83504688eec898c6214f4bf
Fixed
63e5d035e3a7ab7412a008f202633c5e6a0a28ea
Fixed
34b76d1922e41da1fa73d43b764cddd82ac9733c
Fixed
20cf67dcb7db842f941eff1af6ee5e9dc41796d7
Fixed
2d33654d40a05afd91ab24c9a73ab512a0670a9a
Fixed
9525af1f58f67df387768770fcf6d6a8f23aee3d
Fixed
33d38c5da17f8db2d80e811b7829d2822c10625e
Fixed
69c7b2fe4c9cc1d3b1186d1c5606627ecf0de883

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-42232.json"