CVE-2026-138876
In the Linux kernel, the following vulnerability has been resolved: fanotify: report names longer than NAME_MAX fanotify keeps the length of a reported name in a u8, so it drops any name longer than NAME_MAX and warns: WARNING: fs/notify/fanotify/fanotify.h:217 at fanotify_handle_event+0x2e82/0x39f0 Such names are legitimate on some filesystems. vfat mounted with utf8 takes up to 255 UTF-16 characters, which are up to 765 bytes of UTF-8, and FUSE accepts names up to PATH_MAX - 1. readdir() and inotify report them in full. fanotify sends the event without the name, and for FAN_RENAME it trips a second warning in copy_fid_info_to_user(), after which read() fails with EFAULT and the event is lost. When syzbot hit this, Jan suggested accommodating names up to PATH_MAX [1], the limit readdir() already applies to a name (verify_dirent_name()). Store the name lengths as u16, which keeps struct fanotify_info at 8 bytes, and drop without a warning only names of PATH_MAX bytes or more, which no path can refer to. An event with such a name can exceed a page, so allocate name events with kvmalloc(), as Jan also suggested. Names up to NAME_MAX are reported exactly as before, and the record format is unchanged: an event with a long name is just longer.
Affected versions
Linux kernel versions
5.10.220,
5.15.154,
5.17
and later are affected. Fixed in
5.10.275,
5.15.226,
6.1.193,
6.6.163,
6.12.117,
6.18.63,
7.3.4,
7.4-rc1
and their respective stable series.
References
8 totalFrequently asked questions
-
What is CVE-2026-138876?
CVE-2026-138876 is a unscored severity Linux kernel vulnerability . It affects Linux kernel versions from 5.10.220 onward and has been patched in 5.10.275, 5.15.226, 6.1.193 and others. CVE-2026-138876 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
Is there a patch available for CVE-2026-138876?
Yes. CVE-2026-138876 has been patched. Fixed versions include 5.10.275, 5.15.226, 6.1.193 and others. If you are running Linux kernel 5.10.220 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2026-138876 actively exploited?
No. CVE-2026-138876 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.