CVE-2024-42232

libceph: fix race between delayed_work() and ceph_monc_stop()

9.8 critical EPSS 0.76%

Published 7 Aug 2024 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2024-42232

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-42232 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

Severity (CVSS)

9.8 critical CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.76%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 56.5% of all scored CVEs. Scores of 2 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 1177afeca833174ba83504688eec898c6214f4bf
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 63e5d035e3a7ab7412a008f202633c5e6a0a28ea
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 34b76d1922e41da1fa73d43b764cddd82ac9733c
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 20cf67dcb7db842f941eff1af6ee5e9dc41796d7
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 2d33654d40a05afd91ab24c9a73ab512a0670a9a
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 9525af1f58f67df387768770fcf6d6a8f23aee3d
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 33d38c5da17f8db2d80e811b7829d2822c10625e
affected from 0e04dc26cc594d31ee6b1382b452b6bc83b57937, before 69c7b2fe4c9cc1d3b1186d1c5606627ecf0de883
Other versions: unaffected
Linux
affected 4.6
unaffected before 4.6
unaffected from 4.19.318 up to and including 4.19.*
unaffected from 5.4.280 up to and including 5.4.*
unaffected from 5.10.222 up to and including 5.10.*
unaffected from 5.15.163 up to and including 5.15.*
unaffected from 6.1.100 up to and including 6.1.*
unaffected from 6.6.41 up to and including 6.6.*
unaffected from 6.9.10 up to and including 6.9.*
unaffected 6.10 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-42232 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-42232

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-42232
trivy image --scanners vuln IMAGE | grep CVE-2024-42232

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-42232 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.