CVE-2026-138876: fanotify: report names longer than NAME_MAX
fanotify: report names longer than NAMEMAX
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1Fixed in 7.3.4-1
Event History
Frequently Asked Questions
Which filesystem configurations can produce affected fanotify events?
The issue can occur with legitimate filenames longer than NAME_MAX. Examples given are vfat mounted with utf8, where names can reach 765 UTF-8 bytes, and FUSE filesystems, which accept names up to PATH_MAX - 1.
What happens when an affected long filename is reported through fanotify?
For ordinary events, fanotify can send the event without its name and emit a warning. For FAN_RENAME events, copying file identifier information can trigger another warning, read() can fail with EFAULT, and the event is lost.
How does the fix change handling of long names?
The fix stores name lengths as u16 and supports names up to PATH_MAX - 1, allocating large name events with kvmalloc(). Names of PATH_MAX bytes or more are dropped without a warning because no path can refer to them.