{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-46040","id":"CVE-2026-46040","title":"inotify: fix watch count leak when fsnotify_add_inode_mark_locked() fails","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ninotify: fix watch count leak when fsnotify_add_inode_mark_locked() fails\n\nWhen fsnotify_add_inode_mark_locked() fails in inotify_new_watch(),\nthe error path calls inotify_remove_from_idr() but does not call\ndec_inotify_watches() to undo the preceding inc_inotify_watches().\nThis leaks a watch count, and repeated failures can exha","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\ninotify: fix watch count leak when fsnotify_add_inode_mark_locked() fails\n\nWhen fsnotify_add_inode_mark_locked() fails in inotify_new_watch(),\nthe error path calls inotify_remove_from_idr() but does not call\ndec_inotify_watches() to undo the preceding inc_inotify_watches().\nThis leaks a watch count, and repeated failures can exhaust the\nmax_user_watches limit with -ENOSPC even when no watches are active.\n\nPrior to commit 1cce1eea0aff (\"inotify: Convert to using per-namespace\nlimits\"), the watch count was incremented after fsnotify_add_mark_locked()\nsucceeded, so this path was not affected. The conversion moved\ninc_inotify_watches() before the mark insertion without adding the\ncorresponding rollback.\n\nAdd the missing dec_inotify_watches() call in the error path.","published":"2026-05-27T12:56:52.161Z","updated":"2026-11-12T02:31:14.563462039Z","reserved":"2026-05-13T15:03:33.094Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"3ab58cf42c46bf2366d2f55ae5c59299d5e178b7","status":"affected","versionType":"git"},{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"10edf7e0ffdc7faa18e2244b17722c1b882b8273","status":"affected","versionType":"git"},{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"3ad9ccea1b25435f6179b57aa891960beb7ce8f9","status":"affected","versionType":"git"},{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"8bcc1cd237ab5ccfdd102869fa031c541943cf40","status":"affected","versionType":"git"},{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"73ddc8518a32baff6bc17afda4ee1ebae5b4ed12","status":"affected","versionType":"git"},{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"fdaa42ca370d056428e5e171247c8fdce8dff36a","status":"affected","versionType":"git"},{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"9e48844f708eb48bae4e79cb21edc097c966306d","status":"affected","versionType":"git"},{"version":"1cce1eea0aff51201753fcaca421df825b0813b6","lessThan":"6a320935fa4293e9e599ec9f85dc9eb3be7029f8","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.11","status":"affected"},{"version":"0","lessThan":"4.11","status":"unaffected","versionType":"semver"},{"version":"5.10.258","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.209","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.175","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.140","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.86","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.27","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.0.4","lessThanOrEqual":"7.0.*","status":"unaffected","versionType":"semver"},{"version":"7.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/3ab58cf42c46bf2366d2f55ae5c59299d5e178b7","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/10edf7e0ffdc7faa18e2244b17722c1b882b8273","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/3ad9ccea1b25435f6179b57aa891960beb7ce8f9","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/8bcc1cd237ab5ccfdd102869fa031c541943cf40","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/73ddc8518a32baff6bc17afda4ee1ebae5b4ed12","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/fdaa42ca370d056428e5e171247c8fdce8dff36a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/9e48844f708eb48bae4e79cb21edc097c966306d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/6a320935fa4293e9e599ec9f85dc9eb3be7029f8","tags":["Patch","web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46040.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46040","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00129,"epssPercentile":0.02608,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-46040","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46040","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-46040","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-46040","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}