{"id":"CVE-2026-99415","state":"PUBLISHED","title":"ovl: set the revalidate flags after d_instantiate()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\novl: set the revalidate flags after d_instantiate()\n\nstat() of a file on an overlayfs mount triggers a kernel warning and\nfails with ECHILD if another task is creating that file at the same\ntime. This happens on an overlay with a FUSE upper layer, which is the\nlayer where overlayfs creates new files. Write access to a directory on\nsuch an overlay is all a user needs to run the two tasks.\n\nThe revalidate flags are DCACHE_OP_REVALIDATE and\nDCACHE_OP_WEAK_REVALIDATE. They tell path walk to call ->d_revalidate()\nor ->d_weak_revalidate() on a dentry, so that the filesystem can check\nthat the cached dentry is still valid. An overlay dentry only has one of\nthese flags if a dentry in one of its layers has it. FUSE dentries have\nthe first one.\n\nWhen a flag is set on an overlay dentry, path walk calls\novl_dentry_revalidate_common(). That function only expects a dentry\nwithout an inode in RCU walk, while the dentry is being destroyed. For\nsuch a dentry outside of RCU walk, it hits a WARN_ON() and\nreturns -ECHILD. So a negative overlay dentry must never have the flags\nset.\n\novl_instantiate() breaks this rule. When a task creates a file, the\noverlay dentry for the new name is hashed but still negative.\novl_instantiate() then works in this order:\n\n- It copies the flags from the new upper dentry to the overlay dentry.\n- It calls ovl_get_inode(), which can sleep in a getxattr request to the\n  FUSE server.\n- Only then does it call d_instantiate().\n\nA second task that looks up the name between the first step and the last\nfinds a negative dentry with the flags set and revalidates it.\n\nReproduced with a FUSE server that delays its getxattr reply: stat() of\na name that was being created hit the WARN_ON() and failed with ECHILD.\n\nFix this by setting the flags after d_instantiate().","publishedAt":"2026-11-19T14:40:13.532Z","updatedAt":"2026-11-19T14:40:13.532Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"e876482d955476d0c066afda8273bfd38e0f65be","versionType":"git"},{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"7ecbeb1a84f2d099012ccd95a8a7588e1306cc46","versionType":"git"},{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"3d92153206cebe95dc873a4b2b3d506ddf2271e7","versionType":"git"},{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"75e89c0055c1d7f7eeb462995f11253ca5864f79","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/overlayfs/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","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/overlayfs/dir.c"]}],"references":["https://git.kernel.org/stable/c/e876482d955476d0c066afda8273bfd38e0f65be","https://git.kernel.org/stable/c/7ecbeb1a84f2d099012ccd95a8a7588e1306cc46","https://git.kernel.org/stable/c/3d92153206cebe95dc873a4b2b3d506ddf2271e7","https://git.kernel.org/stable/c/75e89c0055c1d7f7eeb462995f11253ca5864f79"],"weaknesses":[],"ingestedAt":"2026-11-19T14:42:06.048Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99415.json","commit":"ac44738435f10e6dbe2f4dd504cf13737f9cf963","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99415","state":"PUBLISHED","datePublished":"2026-11-19T14:40:13.532Z","dateUpdated":"2026-11-19T14:40:13.532Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.413Z"},"containers":{"cna":{"title":"ovl: set the revalidate flags after d_instantiate()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\novl: set the revalidate flags after d_instantiate()\n\nstat() of a file on an overlayfs mount triggers a kernel warning and\nfails with ECHILD if another task is creating that file at the same\ntime. This happens on an overlay with a FUSE upper layer, which is the\nlayer where overlayfs creates new files. Write access to a directory on\nsuch an overlay is all a user needs to run the two tasks.\n\nThe revalidate flags are DCACHE_OP_REVALIDATE and\nDCACHE_OP_WEAK_REVALIDATE. They tell path walk to call ->d_revalidate()\nor ->d_weak_revalidate() on a dentry, so that the filesystem can check\nthat the cached dentry is still valid. An overlay dentry only has one of\nthese flags if a dentry in one of its layers has it. FUSE dentries have\nthe first one.\n\nWhen a flag is set on an overlay dentry, path walk calls\novl_dentry_revalidate_common(). That function only expects a dentry\nwithout an inode in RCU walk, while the dentry is being destroyed. For\nsuch a dentry outside of RCU walk, it hits a WARN_ON() and\nreturns -ECHILD. So a negative overlay dentry must never have the flags\nset.\n\novl_instantiate() breaks this rule. When a task creates a file, the\noverlay dentry for the new name is hashed but still negative.\novl_instantiate() then works in this order:\n\n- It copies the flags from the new upper dentry to the overlay dentry.\n- It calls ovl_get_inode(), which can sleep in a getxattr request to the\n  FUSE server.\n- Only then does it call d_instantiate().\n\nA second task that looks up the name between the first step and the last\nfinds a negative dentry with the flags set and revalidates it.\n\nReproduced with a FUSE server that delays its getxattr reply: stat() of\na name that was being created hit the WARN_ON() and failed with ECHILD.\n\nFix this by setting the flags after d_instantiate()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"e876482d955476d0c066afda8273bfd38e0f65be","versionType":"git"},{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"7ecbeb1a84f2d099012ccd95a8a7588e1306cc46","versionType":"git"},{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"3d92153206cebe95dc873a4b2b3d506ddf2271e7","versionType":"git"},{"version":"bccece1ead368149f90e05ad104dfbfda4422f5d","status":"affected","lessThan":"75e89c0055c1d7f7eeb462995f11253ca5864f79","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/overlayfs/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","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/overlayfs/dir.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e876482d955476d0c066afda8273bfd38e0f65be"},{"url":"https://git.kernel.org/stable/c/7ecbeb1a84f2d099012ccd95a8a7588e1306cc46"},{"url":"https://git.kernel.org/stable/c/3d92153206cebe95dc873a4b2b3d506ddf2271e7"},{"url":"https://git.kernel.org/stable/c/75e89c0055c1d7f7eeb462995f11253ca5864f79"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-19T14:40:13.532Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}