CVE-2026-68082
Gravedad CVSS v3.1:
CRÍTICA
Tipo:
CWE-125
Lectura fuera de límites
Fecha de publicación:
08/08/2026
Última modificación:
19/10/2026
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
libceph: fix two unsafe bare decodes in decode_lockers()<br />
<br />
decode_lockers() in cls_lock_client.c contains two bare decode operations<br />
that allow a malicious or compromised OSD to trigger slab-out-of-bounds<br />
reads:<br />
<br />
1. ceph_decode_32(p) at the num_lockers field has no preceding bounds<br />
check. ceph_start_decoding() accepts struct_len=0 as valid -- the<br />
internal ceph_decode_need(p, end, 0, bad) always passes -- so when an<br />
OSD sends struct_len=0, ceph_start_decoding() returns success with<br />
p == end. The immediately following bare ceph_decode_32(p) then reads<br />
4 bytes past the validated buffer boundary. The garbage value is<br />
passed directly to kzalloc_objs() as the locker count.<br />
<br />
The sibling function decode_watchers() in osd_client.c already uses<br />
ceph_decode_32_safe() after its own ceph_start_decoding() call.<br />
decode_lockers() was the only site using the bare variant.<br />
<br />
2. ceph_decode_8(p) after the decode_locker() loop has no preceding<br />
bounds check. If an OSD crafts num_lockers such that the loop<br />
advances p exactly to end, the subsequent bare ceph_decode_8(p) reads<br />
one byte past the validated buffer boundary. The result is passed<br />
directly into *type, which is used as a lock type discriminator by<br />
callers, giving an OSD-controlled one-byte OOB read with direct<br />
influence over the lock type field.<br />
<br />
Fix both by replacing bare operations with their safe variants:<br />
ceph_decode_32(p) -> ceph_decode_32_safe(p, end, *num_lockers,<br />
err_inval)<br />
ceph_decode_8(p) -> ceph_decode_8_safe(p, end, *type,<br />
err_free_lockers)<br />
<br />
The goto targets differ intentionally:<br />
err_inval: is a new label returning -EINVAL directly. It is used for<br />
the pre-allocation failure path where *lockers is not yet allocated<br />
and must not be passed to ceph_free_lockers().<br />
<br />
err_free_lockers: is the existing label. It is used for the<br />
post-allocation failure path where *lockers is allocated and must<br />
be freed.<br />
<br />
ret is set to -EINVAL before ceph_decode_8_safe() so that<br />
err_free_lockers returns the correct error code on bounds violation.<br />
Without this, err_free_lockers would return a stale ret value (0 from<br />
the successful decode_locker() loop), silently swallowing the error.<br />
<br />
-EINVAL is correct for both failure paths. The data received from the<br />
OSD is structurally malformed. -ENOMEM would misrepresent the failure<br />
class to callers and to stable@ backporters triaging error paths.<br />
<br />
Attacker model: a malicious or compromised OSD in a multi-tenant Ceph<br />
deployment can trigger this against any kernel client that issues the<br />
lock.get_info class method (e.g. during RBD exclusive lock acquisition).<br />
<br />
[ idryomov: trim changelog, formatting ]
Impacto
Puntuación base 3.x
9.80
Gravedad 3.x
CRÍTICA
Referencias a soluciones, herramientas e información
- https://git.kernel.org/stable/c/001835c599899ef1bd3506a815110a6374451554
- https://git.kernel.org/stable/c/02430f6f729b297e803d0605871f0a670b4eafd6
- https://git.kernel.org/stable/c/57ba829804fe6d34bbac3b826c4b15c1caa54862
- https://git.kernel.org/stable/c/7c422364acd93d7da1dfc27d6b54635a269653a1
- https://git.kernel.org/stable/c/89df5d71f83f8e2781286798fd8ae5e42cf5f1a7
- https://git.kernel.org/stable/c/a109a556115271ca7896dcda7b4b7e45e156c227
- https://git.kernel.org/stable/c/a54be593d0b749161b08a1e56189b2cb9114267a
- https://git.kernel.org/stable/c/c8ade01170a27d8ede0d761c255268af81e417f8


