In the Linux kernel, the following vulnerability has been resolved:
ceph: properly decrypt filenames in vmalloc() buffers
The fscrypt subsystem uses the scatterlist crypto API, inheriting its
requirement that any buffers are in the linear mapping region. However,
the messenger client uses kvmalloc() to create buffers for messages,
which will occasionally place those buffers in the vmalloc() region when
physical memory fragmentation doesn't permit a large enough kmalloc().
The various callers of ceph_fname_to_usr() directly pass (slices of) raw
messages from the MDS without considering that the messages may be in
vmalloc() buffers, resulting in oopses especially on non-x86 platforms
(see 'Closes:' for more details and a reproducer).
Make ceph_fname_to_usr() explicitly tolerant of vmalloc()-allocated
fname->ctext, fname->name, and/or oname->name buffers, using tname
(which, when non-null, must be a linear address; when null, is briefly
allocated as necessary) as a bounce buffer to avoid passing any
inappropriate addresses to fscrypt_fname_disk_to_usr().
Additionally change parse_reply_info_readdir() -- the only function to
supply its own tname -- to follow the new "tname must never come from
vmalloc()" rule by passing NULL when the message is not in the linear
region. Though this causes a per-dentry kmalloc()+kfree(), this overhead
exists only when processing the minority of messages that spill into
vmalloc(). My (crude) testing puts this at only about 1 in 8,000 readdir
messages. Still, if the overhead proves unreasonable in the future, it
is easy enough to mitigate: a future change could allocate a bounce
buffer in parse_reply_info_readdir() and use that as tname instead.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - ceph_fname_to_usr() runs while parsing CEPH_MSG_CLIENT_REPLY on the kernel CephFS client TCP session (mds_dispatch → handle_reply → parse_reply_info_readdir/fill_trace); a malicious or compromised MDS delivers the kvmalloc'd filename buffers that are passed into fscrypt.
AC:L - The MDS fully controls hdr.front_len (up to CEPH_MSG_MAX_FRONT_LEN, 16MB). kvmalloc() of that size skips costly kmalloc reclaim and falls back to vmalloc deterministically, so sg_init_one() on the message names does not depend on incidental fragmentation or a race.
PR:N - The attacker is the remote MDS peer on an already-connected kernel CephFS client and needs no Linux UID, capability, or init-namespace root on the victim, matching other MDS-driven client CVEs such as CVE-2026-89651.
UI:N - Once encrypted CephFS is mounted with keys loaded (standard in Rook/Kubernetes/OpenStack, including NFS re-export LOOKUPNAME), readdir and lookup replies are processed automatically in the ceph-msgr path with no further victim mount or interactive step at exploit time.
S:U - Wrong-page scatterlist crypto and any resulting kernel memory corruption stay inside the victim host's CephFS client and do not cross a VM, IOMMU, or sandbox security boundary.
C:H - fname_decrypt() builds src_sg with sg_set_buf()/virt_to_page() on the vmalloc MDS buffer, so skcipher decryption reads unintended kernel pages as ciphertext; that memory-corruption read is High per kernel UAF/wrong-page guidance.
I:H - parse_reply_info_readdir() decrypts filenames in place, so dst_sg also aliases the vmalloc message; crypto_skcipher_decrypt() then writes plaintext through virt_to_page() of a non-linear address, a wrong-page kernel write scored High.
A:H - Passing vmalloc addresses into the scatterlist crypto API oopses or panics, especially on non-x86 where virt_to_page() of a non-linear address faults in scatterwalk, and a malicious MDS can repeat this on every encrypted readdir reply.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - ceph_fname_to_usr() runs while parsing CEPH_MSG_CLIENT_REPLY on the kernel CephFS client TCP session (mds_dispatch → handle_reply → parse_reply_info_readdir/fill_trace); a malicious or compromised MDS delivers the kvmalloc'd filename buffers that are passed into fscrypt.
AC:L - The MDS fully controls hdr.front_len (up to CEPH_MSG_MAX_FRONT_LEN, 16MB). kvmalloc() of that size skips costly kmalloc reclaim and falls back to vmalloc deterministically, so sg_init_one() on the message names does not depend on incidental fragmentation or a race.
PR:N - The attacker is the remote MDS peer on an already-connected kernel CephFS client and needs no Linux UID, capability, or init-namespace root on the victim, matching other MDS-driven client CVEs such as CVE-2026-89651.
UI:N - Once encrypted CephFS is mounted with keys loaded (standard in Rook/Kubernetes/OpenStack, including NFS re-export LOOKUPNAME), readdir and lookup replies are processed automatically in the ceph-msgr path with no further victim mount or interactive step at exploit time.
S:U - Wrong-page scatterlist crypto and any resulting kernel memory corruption stay inside the victim host's CephFS client and do not cross a VM, IOMMU, or sandbox security boundary.
C:H - fname_decrypt() builds src_sg with sg_set_buf()/virt_to_page() on the vmalloc MDS buffer, so skcipher decryption reads unintended kernel pages as ciphertext; that memory-corruption read is High per kernel UAF/wrong-page guidance.
I:H - parse_reply_info_readdir() decrypts filenames in place, so dst_sg also aliases the vmalloc message; crypto_skcipher_decrypt() then writes plaintext through virt_to_page() of a non-linear address, a wrong-page kernel write scored High.
A:H - Passing vmalloc addresses into the scatterlist crypto API oopses or panics, especially on non-x86 where virt_to_page() of a non-linear address faults in scatterwalk, and a malicious MDS can repeat this on every encrypted readdir reply.
CVSS 3.1