CVE-2026-46040

NameCVE-2026-46040
DescriptionIn the Linux kernel, the following vulnerability has been resolved: inotify: fix watch count leak when fsnotify_add_inode_mark_locked() fails When fsnotify_add_inode_mark_locked() fails in inotify_new_watch(), the error path calls inotify_remove_from_idr() but does not call dec_inotify_watches() to undo the preceding inc_inotify_watches(). This leaks a watch count, and repeated failures can exhaust the max_user_watches limit with -ENOSPC even when no watches are active. Prior to commit 1cce1eea0aff ("inotify: Convert to using per-namespace limits"), the watch count was incremented after fsnotify_add_mark_locked() succeeded, so this path was not affected. The conversion moved inc_inotify_watches() before the mark insertion without adding the corresponding rollback. Add the missing dec_inotify_watches() call in the error path.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-4664-1, DLA-4665-1, DLA-4671-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
linux (PTS)bullseye5.10.223-1vulnerable
bullseye (security)5.10.259-1fixed
bookworm6.1.170-3vulnerable
bookworm (security)6.1.176-1fixed
trixie6.12.86-1fixed
trixie (security)6.12.95-1fixed
forky7.0.13-1fixed
sid7.1.3-1fixed
linux-6.1 (PTS)bullseye (security)6.1.176-1~deb11u1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
linuxsourcebullseye5.10.259-1DLA-4664-1
linuxsourcebookworm6.1.176-1DLA-4665-1
linuxsourcetrixie6.12.86-1
linuxsource(unstable)7.0.4-1
linux-6.1sourcebullseye6.1.176-1~deb11u1DLA-4671-1

Notes

https://git.kernel.org/linus/6a320935fa4293e9e599ec9f85dc9eb3be7029f8 (7.1-rc1)

Search for package or bug name: Reporting problems