{"id":"CVE-2026-139051","state":"PUBLISHED","title":"fs: make sure to call fsnotify_inoderemove() only once when inode is dead","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs: make sure to call fsnotify_inoderemove() only once when inode is dead\n\nDaehyeon reported a race wherein fsnotify_removeinode() can be called\nwhen inode still has a live alias.  This can lead to several undesired\noutcomes such as crashes in fsnotify code or avoidance of inode mark\nnotifications.\n\nCheck that inode is really \"dead\", meaning no nlink and no more aliases\nbefore calling fsnotify_inoderemove() for final cleanup of inode marks.\nAlso do not allow open_by_handle() to add new aliases to a \"dead\" inode.\n\nIdeally, we'd call fsnotify_inoderemove() once last inode reference is\ndropped to make things simpler. Alas fsnotify inode marks currently hold\ninode references and thus this doesn't work. Once we teach fsnotify to\navoid holding inode references, these games with dead inodes can go as\nwell.","publishedAt":"2026-11-30T13:27:24.713Z","updatedAt":"2026-11-30T13:27:24.713Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"288194ff49e8e98b4369e73a40c1eb9aeb8fc2e1","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ced6f89824f84baeb80a1775e72776978e641808","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"18ba0295bd43fc086408f3cf515bc57491dbbe3c","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"669bb5af15d41a21359d00a441490f87a88eb52a","versionType":"git"},{"version":"0","status":"affected","lessThan":"6.12.117","versionType":"semver"},{"version":"0","status":"affected","lessThan":"6.18.63","versionType":"semver"},{"version":"0","status":"affected","lessThan":"7.3.4","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/dcache.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/dcache.c"]}],"references":["https://git.kernel.org/stable/c/288194ff49e8e98b4369e73a40c1eb9aeb8fc2e1","https://git.kernel.org/stable/c/ced6f89824f84baeb80a1775e72776978e641808","https://git.kernel.org/stable/c/18ba0295bd43fc086408f3cf515bc57491dbbe3c","https://git.kernel.org/stable/c/669bb5af15d41a21359d00a441490f87a88eb52a"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139051.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139051","state":"PUBLISHED","datePublished":"2026-11-30T13:27:24.713Z","dateUpdated":"2026-11-30T13:27:24.713Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.911Z"},"containers":{"cna":{"title":"fs: make sure to call fsnotify_inoderemove() only once when inode is dead","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs: make sure to call fsnotify_inoderemove() only once when inode is dead\n\nDaehyeon reported a race wherein fsnotify_removeinode() can be called\nwhen inode still has a live alias.  This can lead to several undesired\noutcomes such as crashes in fsnotify code or avoidance of inode mark\nnotifications.\n\nCheck that inode is really \"dead\", meaning no nlink and no more aliases\nbefore calling fsnotify_inoderemove() for final cleanup of inode marks.\nAlso do not allow open_by_handle() to add new aliases to a \"dead\" inode.\n\nIdeally, we'd call fsnotify_inoderemove() once last inode reference is\ndropped to make things simpler. Alas fsnotify inode marks currently hold\ninode references and thus this doesn't work. Once we teach fsnotify to\navoid holding inode references, these games with dead inodes can go as\nwell."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"288194ff49e8e98b4369e73a40c1eb9aeb8fc2e1","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ced6f89824f84baeb80a1775e72776978e641808","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"18ba0295bd43fc086408f3cf515bc57491dbbe3c","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"669bb5af15d41a21359d00a441490f87a88eb52a","versionType":"git"},{"version":"0","status":"affected","lessThan":"6.12.117","versionType":"semver"},{"version":"0","status":"affected","lessThan":"6.18.63","versionType":"semver"},{"version":"0","status":"affected","lessThan":"7.3.4","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/dcache.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/dcache.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/288194ff49e8e98b4369e73a40c1eb9aeb8fc2e1"},{"url":"https://git.kernel.org/stable/c/ced6f89824f84baeb80a1775e72776978e641808"},{"url":"https://git.kernel.org/stable/c/18ba0295bd43fc086408f3cf515bc57491dbbe3c"},{"url":"https://git.kernel.org/stable/c/669bb5af15d41a21359d00a441490f87a88eb52a"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:27:24.713Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}