AZL-117382: CVE-2026-99904 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ceph: fix longname buffer overflow in cephfnametousr()
Snapshot longname reconstruction formats "<name><inode>" via snprintf() and memcpy()s the result into oname->name. Checking the length against NAMEMAX only protects the LOOKUPNAME/export callers, whose buffer is allocated with fscryptfnameallocbuffer(NAMEMAX). The readdir path points oname->name straight at the altname in the MDS reply, whose capacity is altnamelen; the reconstructed name can exceed that while still fitting under NAMEMAX, 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.
Affected Software
Event History
Frequently Asked Questions
Which Ceph operation is exposed to the overflow condition?
The affected path is directory enumeration (readdir) when reconstructing snapshot long names. In this path, the output name points directly to an alternate-name buffer from the MDS reply, sized according to altname_len.
Why does the existing NAME_MAX check not protect this path?
The NAME_MAX check protects LOOKUPNAME and export callers because they allocate a NAME_MAX-sized buffer. The readdir destination can be smaller than NAME_MAX, so a reconstructed name may pass that check but still exceed the alternate-name buffer capacity.
What happens when an oversized reconstructed name is encountered after the fix?
The code retains the actual destination length before decryption changes it and returns -ENAMETOOLONG if the reconstructed name will not fit.