ceph: fix longname buffer overflow in ceph_fname_to_usr()

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

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.

ProductVersions
Linux Linuxdd66df0053ef84add5e684df517aa9b498342381 to before 437541c22e9679d2cddb2028e03122d1d0851039 Affecteddd66df0053ef84add5e684df517aa9b498342381 to before fc4fb91ec42f1bb371f17784ac5a928c73f4f739 Affecteddd66df0053ef84add5e684df517aa9b498342381 to before 8b03dcc96978da9480c908b5a2fd92e697531e33 Affecteddd66df0053ef84add5e684df517aa9b498342381 to before 0c162c18a774ab36c090088d2b27ed9ddb095fa4 Affecteddd66df0053ef84add5e684df517aa9b498342381 to before 71975d6e0db17646102488cf54480fda9de0f7a7 Affected
Linux Linux6.6 Affectedbefore 6.6 Not Affected6.6.163 through 6.6.* Not Affected6.12.118 through 6.12.* Not Affected6.18.64 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.