Where
-Infinity
0
Severity
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

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

libceph: Reject monmaps advertising zero monitors

A message of type CEPHMSGMONMAP contains a monmap that is sent from a monitor to the client. This monmap contains information about the existing monitors in the cluster. Currently, a monmap indicating that there are zero monitors in the cluster is treated as valid. However, it is impossible to have zero monitors in the cluster and still receive a valid monmap from a monitor. Therefore, such a monmap must be corrupted and should be treated as invalid. Furthermore, a monmap with a monitor count of zero can subsequently crash the client when attempting to open a session with a monitor in opensession(). This happens because the "BUGON(monc->monmap->nummon < 1)" assertion in picknewmon() is triggered.

This patch extends a check in cephmonmapdecode() to also reject arriving monmaps with nummon == 0 rather than only with nummon > CEPHMAXMON.

[ idryomov: drop "log output for unusual values of nummon" part ]

First published (updated )
Severity
9.8
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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

libceph: fix two unsafe bare decodes in decodelockers()

decodelockers() in clslockclient.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 cephfreelockers().

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.getinfo class method (e.g. during RBD exclusive lock acquisition).

[ idryomov: trim changelog, formatting ]

1 / 2
Source: MITRE
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203