VDB

CVE-2026-46040

CVE-2026-46040 PUBLISHED

inotify: fix watch count leak when fsnotify_add_inode_mark_locked() fails

Reported by linux · Published May 27, 2026

In 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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel6.12-modules-extra-commonAmazon Linux1:6.12.88-119.157.amzn2023
kernel-livepatch-6.18.30-61.116Amazon Linux1:1.0-0.amzn2023
perf6.18Amazon Linux1:6.18.30-61.116.amzn2023
bpftool6.12Amazon Linux1:6.12.88-119.157.amzn2023
kernel-livepatch-6.1.175-219.357Amazon Linux1:1.0-0.amzn2023
perfAmazon Linux1:6.1.175-219.357.amzn2023
kernel6.18Amazon Linux1:6.18.30-61.116.amzn2023
kernel6.18-develAmazon Linux1:6.18.30-61.116.amzn2023
python3-perf6.18Amazon Linux1:6.18.30-61.116.amzn2023
kernel6.12-toolsAmazon Linux1:6.12.88-119.157.amzn2023
bpftool6.18Amazon Linux1:6.18.30-61.116.amzn2023
kernel6.18-headersAmazon Linux1:6.18.30-61.116.amzn2023

19 more packages have a fixed version. See every fix in Lookup.

Affected products

VendorProductVersions
LinuxLinux1cce1eea0aff51201753fcaca421df825b0813b6, 1cce1eea0aff51201753fcaca421df825b0813b6, 1cce1eea0aff51201753fcaca421df825b0813b6
LinuxLinux4.11, 0, 5.10.258
amazon:2023kernel6.12-modules-extra-common0
amazon:2023kernel-livepatch-6.18.30-61.1160
amazon:2023perf6.180
amazon:2023bpftool6.120
amazon:2023kernel-livepatch-6.1.175-219.3570
amazon:2023perf0
amazon:2023kernel6.180
amazon:2023kernel6.18-devel0
amazon:2023python3-perf6.180
amazon:2023kernel6.12-tools0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.7, 3.1.6
amazon:2023bpftool6.180
amazon:2023kernel6.18-headers0
amazon:2023kernel6.18-tools-devel0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0)3.1.6, 3.1.7
amazon:2023kernel-tools-devel0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0)3.1.7, 3.1.6
amazon:2023kernel-modules-extra-common0

…and 26 more

Timeline

  • May 27, 2026 CVE Published
  • May 28, 2026 EPSS Score (16 in total, the first dated here)
  • May 29, 2026 Security Advisory (131 in total, the first dated here)
  • Jun 4, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (128 in total, the first dated here)
  • Sep 16, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-46040
vulnetix vdb fixes CVE-2026-46040

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-46040/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›