CVE-2026-89652 PUBLISHED

ceph: bound copied dentry name length in NFS export get_name

Assigner: Linux
Reserved: 11.09.2026 Published: 11.09.2026 Updated: 13.09.2026

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

ceph: bound copied dentry name length in NFS export get_name

ceph_get_name() copies the MDS-supplied name into the caller's NAME_MAX-sized buffer with memcpy(name, rinfo->dname, rinfo->dname_len) and then writes name[rinfo->dname_len] = 0, without checking dname_len against NAME_MAX. A malicious or buggy MDS that returns a LOOKUPNAME reply with dname_len > NAME_MAX overflows the buffer. __get_snap_name() copies rde->name / rde->name_len the same unchecked way.

Impact: a malicious or compromised Ceph MDS overflows the NAME_MAX name buffer in a client's NFS-export get_name path, a slab out-of-bounds write reported by KASAN. Reachable when a CephFS mount is re-exported over NFS.

Add ceph_export_copy_name(), which rejects lengths above NAME_MAX with -ENAMETOOLONG before the copy, and use it in both ceph_get_name() and __get_snap_name().

Metrics

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_get_name() copies LOOKUPNAME/LSSNAP dentry names from a Ceph MDS reply over TCP, and nfsd reaches that callback via exportfs_decode_fh_raw() when CephFS is re-exported, so a remote MDS (or NFS client against such a gateway) hits the overflow on the network path. AC:L - A malicious MDS fully controls dname_len and the name bytes. nfsd lookup of a Ceph directory uses d_obtain_alias() then reconnect_path(), which deterministically calls get_name; no race, rare config, or uncontrollable layout is required. PR:N - No local account or capability on the victim is needed. A compromised or malicious MDS supplies the overflowing name, and on NFS-reexported CephFS any remote NFS client can force LOOKUPNAME by presenting a directory filehandle. UI:N - Once CephFS is mounted and re-exported over NFS, nfsd directory filehandle resolution automatically issues LOOKUPNAME and copies the MDS reply; no extra victim mount, click, or interactive step is required at exploit time. S:U - The overflow corrupts kernel stack/memory on the NFS/Ceph client host and does not cross a VM, IOMMU, or other security-authority boundary. C:H - Unbounded memcpy of MDS-controlled name bytes past the NAME_MAX+1 exportfs buffer is memory corruption that can overwrite adjacent kernel objects and be leveraged for arbitrary disclosure. I:H - Attacker-controlled length and contents overflow the NAME_MAX+1 stack buffer in exportfs_decode_fh_raw(), enabling an arbitrary write and control-flow hijacking. A:H - The same out-of-bounds write of a 256-byte name buffer by an MDS-chosen length, reported as a KASAN OOB write, reliably oopses or panics the kernel.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 19913b4eac4a230dccb548931358398f45dabe4c to 61d9f27b191b838b96b697ce0bfaee39a138243a (excl.)
  • affected from 19913b4eac4a230dccb548931358398f45dabe4c to 06fb5e623cdc2402d6bb29be94d9beb9a826ffec (excl.)
  • affected from 19913b4eac4a230dccb548931358398f45dabe4c to e7c2fd3893a7f7fcd7e8cf0b2c6348bb1e893df6 (excl.)
  • affected from 19913b4eac4a230dccb548931358398f45dabe4c to eff8013c5a8916613c742ae5a2cc341cb605c0ae (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 3.15 is affected
  • unaffected from 0 to 3.15 (excl.)
  • unaffected from 6.12.109 to 6.12.* (incl.)
  • unaffected from 6.18.50 to 6.18.* (incl.)
  • unaffected from 7.2.4 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References