CVE-2026-138876

fanotify: report names longer than NAME_MAX

No CVSS score yet EPSS 0.22%

Published 30 Nov 2026 Updated 30 Nov 2026 CNA: Linux

Check your servers for CVE-2026-138876

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138876 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.4% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 4e63ce91997a6ac8b8337e87aafb539590ba9ae9, before a561f301ffb248615070a200cd22136cd671b64a
affected from 3eec21b660856c7af1278a07cf668a680c582bde, before ed70c92b58ab28d4e448b9d5f191e989e1f420a3
affected from 2d9374f095136206a02eb0b6cd9ef94632c1e9f7, before acdb65f153154e013d428a45627deb98fbbfef8f
affected from 2d9374f095136206a02eb0b6cd9ef94632c1e9f7, before 71a52b4cf6ca0316bad296a634598ad82baac6e3
affected from 2d9374f095136206a02eb0b6cd9ef94632c1e9f7, before 460792f7ecbcecc94e4d938063d76c555a73c2bb
affected from 2d9374f095136206a02eb0b6cd9ef94632c1e9f7, before 82c9bc868b49d87893ef3ce8c09ff21300dcb50e
affected from 2d9374f095136206a02eb0b6cd9ef94632c1e9f7, before dba1adf68bc63649994e0e45e74fa6d97416013b
affected from 2d9374f095136206a02eb0b6cd9ef94632c1e9f7, before ff05910cb1b77c2b229c5e6e260c6173a17b579b
affected from 5.10.220, before 5.10.275
affected from 5.15.154, before 5.15.226
Other versions: unaffected
Linux
affected 5.17
unaffected before 5.17
unaffected from 5.10.275 up to and including 5.10.*
unaffected from 5.15.226 up to and including 5.15.*
unaffected from 6.1.193 up to and including 6.1.*
unaffected from 6.6.163 up to and including 6.6.*
unaffected from 6.12.117 up to and including 6.12.*
unaffected from 6.18.63 up to and including 6.18.*
unaffected from 7.3.4 up to and including 7.3.*
unaffected 7.4-rc1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-138876 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138876

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-138876
trivy image --scanners vuln IMAGE | grep CVE-2026-138876

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-138876 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.