{"id":"CVE-2026-46040","aliases":["CVE-2026-46040"],"related":[],"kind":"vulnerability","state":"published","title":"inotify: fix watch count leak when fsnotify_add_inode_mark_locked() fails","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-05-27T12:56:52.161Z","modified":"2026-11-10T13:19:14.573Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"3ab58cf42c46bf2366d2f55ae5c59299d5e178b7","status":"affected"},{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"10edf7e0ffdc7faa18e2244b17722c1b882b8273","status":"affected"},{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"3ad9ccea1b25435f6179b57aa891960beb7ce8f9","status":"affected"},{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"8bcc1cd237ab5ccfdd102869fa031c541943cf40","status":"affected"},{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"73ddc8518a32baff6bc17afda4ee1ebae5b4ed12","status":"affected"},{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"fdaa42ca370d056428e5e171247c8fdce8dff36a","status":"affected"},{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"9e48844f708eb48bae4e79cb21edc097c966306d","status":"affected"},{"type":"git","introduced":"1cce1eea0aff51201753fcaca421df825b0813b6","fixed":"6a320935fa4293e9e599ec9f85dc9eb3be7029f8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.11","status":"unaffected"},{"type":"semver","introduced":"5.10.258","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.209","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.175","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.140","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.86","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.27","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.4","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.11","fixed":"5.10.258"},{"status":"affected","introduced":"5.11","fixed":"5.15.209"},{"status":"affected","introduced":"5.16","fixed":"6.1.175"},{"status":"affected","introduced":"6.2","fixed":"6.6.140"},{"status":"affected","introduced":"6.7","fixed":"6.12.86"},{"status":"affected","introduced":"6.13","fixed":"6.18.27"},{"status":"affected","introduced":"6.19","fixed":"7.0.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/3ab58cf42c46bf2366d2f55ae5c59299d5e178b7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/10edf7e0ffdc7faa18e2244b17722c1b882b8273","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3ad9ccea1b25435f6179b57aa891960beb7ce8f9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8bcc1cd237ab5ccfdd102869fa031c541943cf40","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/73ddc8518a32baff6bc17afda4ee1ebae5b4ed12","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fdaa42ca370d056428e5e171247c8fdce8dff36a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9e48844f708eb48bae4e79cb21edc097c966306d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6a320935fa4293e9e599ec9f85dc9eb3be7029f8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T16:06:05.878Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46040","url":"https://www.cve.org/CVERecord?id=CVE-2026-46040","licence":"CVE Terms of Use","modified":"2026-11-10T12:47:01.630Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46040","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46040","licence":"Public domain","modified":"2026-11-10T13:19:14.573Z"}],"updatedAt":"2026-11-25T22:59:22.556Z","epss":{"score":0.00163,"percentile":0.05763,"date":"2026-12-01T12:00:22.000Z"}}