CVE-2024-26689: ceph: prevent use-after-free in encode_cap_msg()
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.
Security readout for executives and security teams
Plain-English summary
A race condition in the Linux Ceph filesystem client can access memory after it has been freed. Successful exploitation could compromise confidentiality, integrity, and availability. Risk is concentrated on systems using affected Linux kernels with Ceph filesystem functionality, rather than every Linux host.
Executive priority
Treat this as a high-priority kernel remediation for Ceph-using systems, especially multi-tenant or business-critical storage environments. It does not warrant assuming organization-wide Linux exposure or active attack without supporting evidence. Patch through supported distribution channels and verify the running kernel afterward.
Technical view
The flaw occurs in fs/ceph/caps.c when encode_cap_msg() obtains a reference to an extended-attribute buffer that handle_cap_grant() may concurrently release. The correction moves the reference increment to __prep_cap(), preventing the buffer from being freed before use. The supplied CVSS 3.1 score is 8.8, requiring low privileges and no user interaction.
Likely exposure
Prioritize Linux systems that mount or otherwise use Ceph filesystems and run an affected kernel. The supplied record identifies affected releases from 2.6.34 through listed 5.10, 5.15, 6.1, 6.6, 6.7, and 6.8 versions. Distribution backports may make version-only assessment unreliable.
Exploitation context
The supplied record does not identify CISA KEV inclusion or provide evidence of active exploitation. Its CVSS vector describes network reachability, low attack complexity, low privileges, no user interaction, and potentially high confidentiality, integrity, and availability impact. Practical exploitability is not established by the supplied sources.
Researcher notes
KASAN detected the use-after-free at ceph_buffer_get(arg->xattr_buf). The reported race is between reference acquisition during capability-message preparation and release in handle_cap_grant(). The fix establishes the reference earlier in __prep_cap(). The bundle does not provide proof of reliable exploitation, affected configuration prerequisites beyond the Ceph code path, or observed attacks.
Mitigation direction
Apply vendor-supported kernel updates containing the cited upstream stable fix.
Prioritize Ceph filesystem clients and hosts processing untrusted or multi-tenant Ceph activity.
If immediate patching is impossible, reduce unnecessary access to affected Ceph-mounted systems.
Check distribution advisories because maintained kernels may contain backported fixes under unchanged version numbers.
Validation and detection
Inventory kernel versions and identify hosts using the Linux Ceph filesystem client.
Confirm installed kernel packages include the applicable cited stable commit or vendor backport.
Review kernel logs and monitoring for Ceph-related crashes or memory-safety alerts.
Reboot after kernel updates and verify the patched kernel is actively running.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-26689 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.