Linux kernel fanotify drops file names longer than NAME_MAX
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Partial Red Hat: 4 without a fix
No CVSS vector from any source. Fix status from CNA and Red Hat.
Summary
The Linux kernel fanotify subsystem stores reported name lengths in a u8, so it drops any name longer than NAME_MAX and loses the event. Linux kernel versions from 5.10.220 before 5.10.275, from 5.15.154 before 5.15.226, and from 5.17 are affected. Legitimate long names on filesystems such as vfat and FUSE trigger a kernel warning, and for FAN_RENAME events the read fails with EFAULT.
Written with Claude Haiku 5.5 from the sources below · 2026-12-01
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update the Linux kernel to 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63, 7.3.4 or 7.4-rc1, depending on the branch in use. The sources list no fixed version for Red Hat Enterprise Linux 10 or Red Hat Enterprise Linux 9, and Red Hat lists no fix available for them. The sources list no fixed version for Red Hat OpenShift Container Platform 4. The sources list no fixed version for Red Hat OpenShift Container Platform 5.
Written with Claude Haiku 5.5 from the sources below · 2026-12-01
- Fix · CNA Linux (Linux) Fixed in 5.10.275, 5.15.226
- Fix · CNA Linux (Linux) 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
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 5 | Affected | No fix yet: Fix deferred |
Not affected: 5 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift Container Platform 4
Timeline
- 2026-11-30 Threatist record created from CVE-2026-138876
- 2026-11-30 Alias added: GHSA-xvq4-3xjw-rrch
- 2026-12-01 Affected versions changed · Red Hat
- 2026-12-01 CVSS score added · Red Hat
References
Other 8
- https://git.kernel.org/stable/c/a561f301ffb248615070a200cd22136cd671b64a
- https://git.kernel.org/stable/c/ed70c92b58ab28d4e448b9d5f191e989e1f420a3
- https://git.kernel.org/stable/c/acdb65f153154e013d428a45627deb98fbbfef8f
- https://git.kernel.org/stable/c/71a52b4cf6ca0316bad296a634598ad82baac6e3
- https://git.kernel.org/stable/c/460792f7ecbcecc94e4d938063d76c555a73c2bb
- https://git.kernel.org/stable/c/82c9bc868b49d87893ef3ce8c09ff21300dcb50e
- https://git.kernel.org/stable/c/dba1adf68bc63649994e0e45e74fa6d97416013b
- https://git.kernel.org/stable/c/ff05910cb1b77c2b229c5e6e260c6173a17b579b
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-138876 · CVE Program
- CVE-2026-138876 · NVD
- GHSA-xvq4-3xjw-rrch · GitHub Advisory Database · CC BY 4.0
- CVE-2026-138876 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences