Vulnerability · Published Apr 3, 2024 · Assigned by Linux

CVE-2024-26689ceph: prevent use-after-free in encode_cap_msg()

High 8.8

In plain English

A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.8High
Exploit odds (30 days)0.7%top 46.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.82-1DEBIAN-CVE-2024-26689
Debian:13linux6.7.7-1DEBIAN-CVE-2024-26689
Debian:14linux6.7.7-1DEBIAN-CVE-2024-26689
Ubuntu:22.04:LTSlinux5.15.0-106.116UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-aws5.15.0-1061.67UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-aws-6.56.5.0-1023.23~22.04.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-aws-6.56.5.0-1023.23~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-azure5.15.0-1063.72UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1024.25~22.04.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1024.25~22.04.1USN-6895-2
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1063.72.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-gcp5.15.0-1059.67UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1024.26~22.04.1USN-6895-2
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1024.26~22.04.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-gke5.15.0-1058.63UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1044.51UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-44.44~22.04.1USN-6900-1
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-44.44~22.04.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-ibm5.15.0-1054.57UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1057.63UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-kvm5.15.0-1058.63UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-106.116UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-44.44.1~22.04.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-44.44.1~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1054.55UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1023.24USN-6895-1
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1023.24UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1026.26UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1015.15UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1027.28USN-6895-4
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1027.28UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-oracle5.15.0-1059.65UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1026.26~22.04.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1026.26~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-raspi5.15.0-1054.57UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1017.18~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1017.18~22.04.1UBUNTU-CVE-2024-26689
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2024-26689

Affected products (as reported)

VendorProductVersions
Linux Linux 9030aaf9bf0a1eee47a154c316c789e959638b0f – before 8180d0c27b93a6eb60da1b08ea079e39263282149030aaf9bf0a1eee47a154c316c789e959638b0f – before 70e329b440762390258a6fe8c0de93c9fdd56c779030aaf9bf0a1eee47a154c316c789e959638b0f – before f3f98d7d84b31828004545e29fd7262b9f4441399030aaf9bf0a1eee47a154c316c789e959638b0f – before ae20db45e482303a20e56f2db667a9d9c54ac7e79030aaf9bf0a1eee47a154c316c789e959638b0f – before 7958c1bf5b03c6f1f58e724dbdec93f8f60b96fc9030aaf9bf0a1eee47a154c316c789e959638b0f – before cda4672da1c26835dcbd7aec2bfed954eda9b5ef
Linux Linux 2.6.34

References