CVE-2026-138876
publishedfanotify: report names longer than NAME_MAX
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux4e63ce91997a6ac8b8337e87aafb539590ba9ae9 to < a561f301ffb248615070a200cd22136cd671b64a · 3eec21b660856c7af1278a07cf668a680c582bde to < ed70c92b58ab28d4e448b9d5f191e989e1f420a3 · 2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < acdb65f153154e013d428a45627deb98fbbfef8f · 2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < 71a52b4cf6ca0316bad296a634598ad82baac6e3 · 2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < 460792f7ecbcecc94e4d938063d76c555a73c2bb · 2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < 82c9bc868b49d87893ef3ce8c09ff21300dcb50e · 2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < dba1adf68bc63649994e0e45e74fa6d97416013b · 2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < ff05910cb1b77c2b229c5e6e260c6173a17b579b · 5.10.220 to < 5.10.275 · 5.15.154 to < 5.15.226 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.17 (affected) · 0 to < 5.17 (unaffected · semver) · 5.10.275 through 5.10.* (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Pending Fix; Not Affected | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Pending Fix | Not stated | Amazon Linux assessment |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 4e63ce91997a6ac8b8337e87aafb539590ba9ae9 to < a561f301ffb248615070a200cd22136cd671b64a (affected · git)3eec21b660856c7af1278a07cf668a680c582bde to < ed70c92b58ab28d4e448b9d5f191e989e1f420a3 (affected · git)2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < acdb65f153154e013d428a45627deb98fbbfef8f (affected · git)2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < 71a52b4cf6ca0316bad296a634598ad82baac6e3 (affected · git)2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < 460792f7ecbcecc94e4d938063d76c555a73c2bb (affected · git)2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < 82c9bc868b49d87893ef3ce8c09ff21300dcb50e (affected · git)2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < dba1adf68bc63649994e0e45e74fa6d97416013b (affected · git)2d9374f095136206a02eb0b6cd9ef94632c1e9f7 to < ff05910cb1b77c2b229c5e6e260c6173a17b579b (affected · git)5.10.220 to < 5.10.275 (affected · semver)5.15.154 to < 5.15.226 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 5.17 (affected)0 to < 5.17 (unaffected · semver)5.10.275 through 5.10.* (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
8- https://git.kernel.org/stable/c/460792f7ecbcecc94e4d938063d76c555a73c2bb
- https://git.kernel.org/stable/c/71a52b4cf6ca0316bad296a634598ad82baac6e3
- https://git.kernel.org/stable/c/82c9bc868b49d87893ef3ce8c09ff21300dcb50e
- https://git.kernel.org/stable/c/a561f301ffb248615070a200cd22136cd671b64a
- https://git.kernel.org/stable/c/acdb65f153154e013d428a45627deb98fbbfef8f
- https://git.kernel.org/stable/c/dba1adf68bc63649994e0e45e74fa6d97416013b
- https://git.kernel.org/stable/c/ed70c92b58ab28d4e448b9d5f191e989e1f420a3
- https://git.kernel.org/stable/c/ff05910cb1b77c2b229c5e6e260c6173a17b579b
Provider assertions
1Linux · cna
fanotify: report names longer than NAME_MAX
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 9d892b1871039e778911eb685e96be72a9339767dde2d55d5fb9ddc3fadd14db
- Ingested
- 30 Nov 2026, 13:30:06 UTC
- Source record
- Official CVE record