# CVE-2026-99904: ceph: fix longname buffer overflow in ceph_fname_to_usr()

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2026-11-30T13:18:08.522Z
- Modified: 2026-12-01T06:17:57.410Z
- Assigned by: Linux

## Description

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

ceph: fix longname buffer overflow in ceph_fname_to_usr()

Snapshot longname reconstruction formats "_<name>_<inode>" via snprintf()
and memcpy()s the result into oname->name.  Checking the length against
NAME_MAX only protects the LOOKUPNAME/export callers, whose buffer is
allocated with fscrypt_fname_alloc_buffer(NAME_MAX).  The readdir path
points oname->name straight at the altname in the MDS reply, whose
capacity is altname_len; the reconstructed name can exceed that while
still fitting under NAME_MAX, overflowing the in-place destination.

Save the actual oname->len before the decryption overwrites it, and fail
with -ENAMETOOLONG when the reconstructed name would not fit.

(As written by CVE List.)

## Affected

- Linux Linux: from dd66df0053ef84add5e684df517aa9b498342381 before 437541c22e9679d2cddb2028e03122d1d0851039; from dd66df0053ef84add5e684df517aa9b498342381 before fc4fb91ec42f1bb371f17784ac5a928c73f4f739; from dd66df0053ef84add5e684df517aa9b498342381 before 8b03dcc96978da9480c908b5a2fd92e697531e33; from dd66df0053ef84add5e684df517aa9b498342381 before 0c162c18a774ab36c090088d2b27ed9ddb095fa4; from dd66df0053ef84add5e684df517aa9b498342381 before 71975d6e0db17646102488cf54480fda9de0f7a7; 6.6 (not affected: before 6.6; from 6.6.163 up to 6.6.*; from 6.12.118 up to 6.12.*; from 6.18.64 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/437541c22e9679d2cddb2028e03122d1d0851039>
- <https://git.kernel.org/stable/c/fc4fb91ec42f1bb371f17784ac5a928c73f4f739>
- <https://git.kernel.org/stable/c/8b03dcc96978da9480c908b5a2fd92e697531e33>
- <https://git.kernel.org/stable/c/0c162c18a774ab36c090088d2b27ed9ddb095fa4>
- <https://git.kernel.org/stable/c/71975d6e0db17646102488cf54480fda9de0f7a7>

## Sources

- CVE List: [CVE-2026-99904](https://www.cve.org/CVERecord?id=CVE-2026-99904), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-99904](https://nvd.nist.gov/vuln/detail/CVE-2026-99904), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-99904 · Whole record: https://cve.day/CVE-2026-99904.json · Rebuilt by cve.day 2026-12-01T06:32:20.906Z
