CVE-2024-26689
ceph: prevent use-after-free in encode_cap_msg()
Check your servers for CVE-2024-26689
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-26689 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.
Description
In the Linux kernel, the following vulnerability has been resolved:
ceph: prevent use-after-free in encode_cap_msg()
In fs/ceph/caps.c, in encode_cap_msg(), "use after free" error was caught by KASAN at this line - 'ceph_buffer_get(arg->xattr_buf);'. This implies before the refcount could be increment here, it was freed.
In same file, in "handle_cap_grant()" refcount is decremented by this line - 'ceph_buffer_put(ci->i_xattrs.blob);'. It appears that a race occurred and resource was freed by the latter line before the former line could increment it.
encode_cap_msg() is called by __send_cap() and __send_cap() is called by ceph_check_caps() after calling __prep_cap(). __prep_cap() is where arg->xattr_buf is assigned to ci->i_xattrs.blob. This is the spot where the refcount must be increased to prevent "use after free" error.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/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
- low: the attacker needs an ordinary user 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.70%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 54.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 15 Aug 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.
| Product | Versions |
|---|---|
| Linux |
affected from 9030aaf9bf0a1eee47a154c316c789e959638b0f, before 8180d0c27b93a6eb60da1b08ea079e3926328214 affected from 9030aaf9bf0a1eee47a154c316c789e959638b0f, before 70e329b440762390258a6fe8c0de93c9fdd56c77 affected from 9030aaf9bf0a1eee47a154c316c789e959638b0f, before f3f98d7d84b31828004545e29fd7262b9f444139 affected from 9030aaf9bf0a1eee47a154c316c789e959638b0f, before ae20db45e482303a20e56f2db667a9d9c54ac7e7 affected from 9030aaf9bf0a1eee47a154c316c789e959638b0f, before 7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc affected from 9030aaf9bf0a1eee47a154c316c789e959638b0f, before cda4672da1c26835dcbd7aec2bfed954eda9b5ef
Other versions: unaffected
|
| Linux |
affected 2.6.34 unaffected before 2.6.34 unaffected from 5.10.210 up to and including 5.10.* unaffected from 5.15.149 up to and including 5.15.* unaffected from 6.1.79 up to and including 6.1.* unaffected from 6.6.18 up to and including 6.6.* unaffected from 6.7.6 up to and including 6.7.* unaffected 6.8 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-26689 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-26689
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-26689
trivy image --scanners vuln IMAGE | grep CVE-2024-26689
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
- https://git.kernel.org/stable/c/8180d0c27b93a6eb60da1b08ea079e3926328214 git.kernel.org
- https://git.kernel.org/stable/c/70e329b440762390258a6fe8c0de93c9fdd56c77 git.kernel.org
- https://git.kernel.org/stable/c/f3f98d7d84b31828004545e29fd7262b9f444139 git.kernel.org
- https://git.kernel.org/stable/c/ae20db45e482303a20e56f2db667a9d9c54ac7e7 git.kernel.org
- https://git.kernel.org/stable/c/7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc git.kernel.org
- https://git.kernel.org/stable/c/cda4672da1c26835dcbd7aec2bfed954eda9b5ef git.kernel.org
- https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html lists.debian.org
Source: the record CVE-2024-26689 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.
Vulnpocalypse