CVE-2024-26689

ceph: prevent use-after-free in encode_cap_msg()

HIGH
7.8
CVSS Score
Published: April 3, 2024 at 02:54 PM UTC
Updated: August 5, 2026 at 12:04 PM UTC
2 products affected across 2 vendorsLinux KernelDebian Linux

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.7%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 5.10.2102.6.34 ≤ v < 5.10.2102.6.34 ≤ v < 5.15.1492.6.34 ≤ v < 6.1.792.6.34 ≤ v < 6.6.182.6.34 ≤ v < 6.7.62.6.34 ≤ v < 6.85.11 ≤ v < 5.15.1495.16 ≤ v < 6.1.796.2 ≤ v < 6.6.186.7 ≤ v < 6.7.66.8 rc16.8 rc26.8 rc39030aaf9bf0a1eee47a154c316c789e959638b0f
Vendor states this is fixed in 70e329b440762390258a6fe8c0de93c9fdd56c77 (fixed)
Vendor states this is fixed in 7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc (fixed)
Vendor states this is fixed in 8180d0c27b93a6eb60da1b08ea079e3926328214 (fixed)
Vendor states this is fixed in ae20db45e482303a20e56f2db667a9d9c54ac7e7 (fixed)
Vendor states this is fixed in cda4672da1c26835dcbd7aec2bfed954eda9b5ef (fixed)
Vendor states this is fixed in f3f98d7d84b31828004545e29fd7262b9f444139 (fixed)
Vendor states this is fixed in 2.6.34 (unaffected)
Vendor states this is fixed in 5.10.210 (unaffected)
Vendor states this is fixed in 5.15.149 (unaffected)
Vendor states this is fixed in 6.1.79 (unaffected)
Vendor states this is fixed in 6.6.18 (unaffected)
Vendor states this is fixed in 6.7.6 (unaffected)
Vendor states this is fixed in 6.8 (unaffected)

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/70e329b440762390258a6fe8c0de93c9fdd56c77
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8180d0c27b93a6eb60da1b08ea079e3926328214
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ae20db45e482303a20e56f2db667a9d9c54ac7e7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cda4672da1c26835dcbd7aec2bfed954eda9b5ef
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f3f98d7d84b31828004545e29fd7262b9f444139
Mailing List
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card