CRITICAL Introduced in 2.6.34
ceph XattrValue OOB
CVE-2026-89649
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
KernelScan AI9.1CRITICAL
01Description
In the Linux kernel, the following vulnerability has been resolved: ceph: bound xattr value length in __build_xattrs() __build_xattrs() decodes the MDS-supplied xattr blob one attribute at a time. For each attribute it reads a 32-bit name length, advances past the name bytes, reads a 32-bit value length, records the value pointer, and advances past the value bytes. The two length fields are read with ceph_decode_32_safe(), but the value bytes themselves are advanced over with a bare "p += len" and no ceph_decode_need() check that "len" bytes remain in the blob. For every attribute except the last, the next iteration's ceph_decode_32_safe() on the following name length implicitly verifies that the previous value did not run past the blob end. The final attribute has no successor, so its decoded value length is never checked against the blob bounds. A malicious or compromised metadata server can set the last attribute's value length larger than the bytes actually present in the blob. The blob is a dedicated kvmalloc() allocation sized to the wire length (ceph_buffer_new() in ceph_fill_inode()). __set_xattr() records the oversized length in xattr->val_len verbatim, and a later getxattr(2) runs memcpy(value, xattr->val, xattr->val_len) into a user-supplied buffer, copying bytes past the end of the allocation back to user space. Impact: a malicious metadata server discloses adjacent kernel heap bytes to a local user via getxattr(2) on a CephFS file. Add the missing ceph_decode_need() so an out-of-bounds value length on the final attribute fails the decode and returns -EIO instead of being stored.
02KernelScan AI Analysis
Risk summary
Any system with a CephFS filesystem mounted is at risk if the metadata server is malicious or compromised. The server can send a crafted extended-attribute blob whose final entry claims a value length exceeding the actual data, causing the client kernel to store an oversized length. A local user reading that attribute receives adjacent kernel heap bytes, enabling disclosure of sensitive kernel memory and potential KASLR bypass; the oversized copy can also fault into unmapped pages and crash the kernel.
Vulnerability analysis
When a CephFS client receives extended-attribute data from a metadata server, the parser trusts the server-supplied value length for the final attribute without verifying it against the actual blob size. A malicious or compromised metadata server can set the last attribute's value length larger than the bytes present, and the kernel stores that oversized length verbatim. When a local user later reads the attribute, the kernel copies bytes past the end of the dedicated allocation into userspace, leaking adjacent kernel heap memory. The fix adds a bounds check so that an out-of-bounds value length on any attribute — including the last one — fails the decode and is rejected rather than stored. The vulnerability is reachable on any system with a CephFS mount: the malicious input arrives from the metadata server over the network, and the leak is triggered by an unprivileged local user reading the affected file's extended attributes.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.34 | 5.10.270 | 848b80ca6b41 |
| 5.15 | 2.6.34 | 5.15.221 | 01e3f19c301d |
| 6.1 | 2.6.34 | 6.1.188 | cb0cd79ae804 |
| 6.12 | 2.6.34 | 6.12.109 | 38be2f3c41ec |
| 6.18 | 2.6.34 | 6.18.50 | 1dd356310b16 |
| 6.6 | 2.6.34 | 6.6.157 | 61f085cb8976 |
| 7.2 | 2.6.34 | 7.2.4 | b12b3320c81f |
| mainline | 2.6.34 | 7.3 | 68d541754d6c |
| cip/5.10 | 2.6.34 | 5.10.271-cip78 | 848b80ca6b41 |
| cip/6.1 | 2.6.34 | 6.1.189-cip61 | cb0cd79ae804 |
| cip/6.1-rt | 2.6.34 | 6.1.189-cip61-rt32 | cb0cd79ae804 |
| cip/6.12 | 2.6.34 | 6.12.111-cip32 | 38be2f3c41ec |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |