CVE-2026-89651: ceph: bound MDSCapAuth path and fs_name decode in handle_session()
In the Linux kernel, the following vulnerability has been resolved:
ceph: bound MDSCapAuth path and fsname decode in handlesession()
handlesession() decodes the MDSCapAuth records carried by a CEPHSESSIONOPEN message (msgversion >= 6). For each record the match.path and match.fsname byte strings are read by first decoding a 32-bit length and then copying that many bytes with the bare cephdecodecopy(). Unlike the surrounding fields, which all use the safe decode variants, these two copies are not preceded by a cephdecodeneed() bounds check, and the enclosing MDSCapAuth and MDSCapMatch structlen fields are skipped rather than enforced as an upper bound. A length larger than the bytes remaining in the message front makes cephdecodecopy() read past the end of the front buffer.
The message front is a dedicated allocation (cephmsgnew2() -> kvmalloc), so the over-read runs off that object. A malicious or compromised MDS can trigger this with the first post-connect message on mount, with no client-side user interaction; under KASAN it is reported as a slab-out-of-bounds read in handlesession().
Impact: a malicious MDS can force the kernel client to read up to 4 GiB past the message front allocation during session setup, crashing the client (out-of-bounds read).
Switch both copies to cephdecodecopysafe(), which performs the cephdecodeneed() bounds check before the copy and branches to the existing bad label, matching the rest of the decoder and the error path that frees the partially decoded capauths array.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ceph (Linux kernel)to a version that resolves this vulnerability.Patch ceph: bound MDSCapAuth path and fs_name decode in handle_session() - Compensating control
Mitigate the risk from a malicious/compromised MDS by restricting which MDS instances are allowed to communicate with the affected kernel client (e.g., enforce trusted cluster network connectivity and access control for post-connect MDS session establishment).
- Operational
After upgrading the kernel fix, validate that session setup with MDSCapAuth records succeeds without slab/bounds issues (e.g., re-run KASAN/boot-time validation if used previously, and confirm handle_session() no longer triggers out-of-bounds read reports).
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Linux systems using the kernel Ceph client and connecting to an MDS that sends a CEPH_SESSION_OPEN message with message version 6 or later are exposed. The triggering message can be the first post-connect message during mount.
What access does an attacker need to trigger it?
An attacker needs control of, or the ability to compromise, a Ceph Metadata Server (MDS) that the kernel client connects to. No client-side user interaction is required.
How can administrators identify a possible trigger?
With KASAN enabled, the issue is reported as a slab-out-of-bounds read in handle_session(). The malformed MDS capability record contains path or fs_name lengths larger than the remaining bytes in the message front buffer.