CVE-2026-68082

Source
https://cve.org/CVERecord?id=CVE-2026-68082
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68082.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-68082
Downstream
Related
Published
2026-08-08T09:17:45.394Z
Modified
2026-08-15T11:31:11.546324877Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
libceph: fix two unsafe bare decodes in decode_lockers()
Details

In the Linux kernel, the following vulnerability has been resolved:

libceph: fix two unsafe bare decodes in decode_lockers()

decodelockers() in clslock_client.c contains two bare decode operations that allow a malicious or compromised OSD to trigger slab-out-of-bounds reads:

  1. cephdecode32(p) at the numlockers field has no preceding bounds check. cephstartdecoding() accepts structlen=0 as valid -- the internal cephdecodeneed(p, end, 0, bad) always passes -- so when an OSD sends structlen=0, cephstartdecoding() returns success with p == end. The immediately following bare cephdecode32(p) then reads 4 bytes past the validated buffer boundary. The garbage value is passed directly to kzallocobjs() as the locker count.

    The sibling function decodewatchers() in osdclient.c already uses cephdecode32safe() after its own cephstartdecoding() call. decodelockers() was the only site using the bare variant.

  2. cephdecode8(p) after the decodelocker() loop has no preceding bounds check. If an OSD crafts numlockers such that the loop advances p exactly to end, the subsequent bare cephdecode8(p) reads one byte past the validated buffer boundary. The result is passed directly into *type, which is used as a lock type discriminator by callers, giving an OSD-controlled one-byte OOB read with direct influence over the lock type field.

Fix both by replacing bare operations with their safe variants: cephdecode32(p) -> cephdecode32safe(p, end, *numlockers, errinval) cephdecode8(p) -> cephdecode8safe(p, end, *type, errfreelockers)

The goto targets differ intentionally: errinval: is a new label returning -EINVAL directly. It is used for the pre-allocation failure path where *lockers is not yet allocated and must not be passed to cephfree_lockers().

errfreelockers: is the existing label. It is used for the post-allocation failure path where *lockers is allocated and must be freed.

ret is set to -EINVAL before cephdecode8safe() so that errfreelockers returns the correct error code on bounds violation. Without this, errfreelockers would return a stale ret value (0 from the successful decodelocker() loop), silently swallowing the error.

-EINVAL is correct for both failure paths. The data received from the OSD is structurally malformed. -ENOMEM would misrepresent the failure class to callers and to stable@ backporters triaging error paths.

Attacker model: a malicious or compromised OSD in a multi-tenant Ceph deployment can trigger this against any kernel client that issues the lock.get_info class method (e.g. during RBD exclusive lock acquisition).

[ idryomov: trim changelog, formatting ]

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68082.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d4ed4a530562881cc5225050e42d96034f405aae
Fixed
a54be593d0b749161b08a1e56189b2cb9114267a
Fixed
a109a556115271ca7896dcda7b4b7e45e156c227

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68082.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.9.0
Fixed
7.1.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68082.json"