{"id":"CVE-2026-99424","state":"PUBLISHED","title":"ovl: set OVL_WHITEOUTS before publishing the upper dir","description":"In the Linux kernel, the following vulnerability has been resolved:\n\novl: set OVL_WHITEOUTS before publishing the upper dir\n\nListing a directory while it is copied up causes a use-after-free of\nthe readdir cache.\n\nA merge directory must never be iterated as a real upper directory:\nthat mode frees the cache in OVL_I(inode)->cache without looking at\nits refcount, while files opened in merged mode still use it.\novl_copy_up_workdir() publishes the upper dentry before it sets\nOVL_WHITEOUTS, and ovl_dir_open() samples both without a lock, so an\nopen between the two stores finds the upper directory and takes it\nfor a real one.\n\nWith a delay between the two stores, an unprivileged process that\nlisted a directory during its copy-up saw only \".\" and \"..\", and its\nnext getdents freed the readdir cache of another descriptor.\n\nFix this by setting OVL_WHITEOUTS before ovl_inode_update(), so that\novl_dir_reset() agrees with ovl_dir_open(), and by testing\nOVL_TYPE_MERGE() of the path type in ovl_dir_open(), so that an open\nthat observes the upper dentry never iterates a merge dir as a real\ndir, regardless of the order in which it observes the flag.\n\n[amir: test OVL_TYPE_MERGE() instead of smp_rmb() in ovl_dir_open()]","publishedAt":"2026-11-19T14:40:27.661Z","updatedAt":"2026-11-22T11:08:10.254Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"43ad4a3090e1c2a0c34e9802882b42c5c078d556","versionType":"git"},{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"7805739ce4577f2c53f5a30be2d48e83e91c63bc","versionType":"git"},{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"ea5327a9228bfd1609e54f1fca50786e8f963da5","versionType":"git"},{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"cbec8610ec5aaf35df50094ff639febc23f20773","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/overlayfs/copy_up.c","fs/overlayfs/readdir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.15","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/copy_up.c","fs/overlayfs/readdir.c"]}],"references":["https://git.kernel.org/stable/c/43ad4a3090e1c2a0c34e9802882b42c5c078d556","https://git.kernel.org/stable/c/7805739ce4577f2c53f5a30be2d48e83e91c63bc","https://git.kernel.org/stable/c/ea5327a9228bfd1609e54f1fca50786e8f963da5","https://git.kernel.org/stable/c/cbec8610ec5aaf35df50094ff639febc23f20773"],"weaknesses":[],"ingestedAt":"2026-11-22T11:18:06.032Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99424.json","commit":"247cc9beefd85903834df0592e88a44f4d599223","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99424","state":"PUBLISHED","datePublished":"2026-11-19T14:40:27.661Z","dateUpdated":"2026-11-22T11:08:10.254Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.414Z"},"containers":{"cna":{"title":"ovl: set OVL_WHITEOUTS before publishing the upper dir","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\novl: set OVL_WHITEOUTS before publishing the upper dir\n\nListing a directory while it is copied up causes a use-after-free of\nthe readdir cache.\n\nA merge directory must never be iterated as a real upper directory:\nthat mode frees the cache in OVL_I(inode)->cache without looking at\nits refcount, while files opened in merged mode still use it.\novl_copy_up_workdir() publishes the upper dentry before it sets\nOVL_WHITEOUTS, and ovl_dir_open() samples both without a lock, so an\nopen between the two stores finds the upper directory and takes it\nfor a real one.\n\nWith a delay between the two stores, an unprivileged process that\nlisted a directory during its copy-up saw only \".\" and \"..\", and its\nnext getdents freed the readdir cache of another descriptor.\n\nFix this by setting OVL_WHITEOUTS before ovl_inode_update(), so that\novl_dir_reset() agrees with ovl_dir_open(), and by testing\nOVL_TYPE_MERGE() of the path type in ovl_dir_open(), so that an open\nthat observes the upper dentry never iterates a merge dir as a real\ndir, regardless of the order in which it observes the flag.\n\n[amir: test OVL_TYPE_MERGE() instead of smp_rmb() in ovl_dir_open()]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"43ad4a3090e1c2a0c34e9802882b42c5c078d556","versionType":"git"},{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"7805739ce4577f2c53f5a30be2d48e83e91c63bc","versionType":"git"},{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"ea5327a9228bfd1609e54f1fca50786e8f963da5","versionType":"git"},{"version":"b79e05aaa166755fafbf02db275175edb5175df8","status":"affected","lessThan":"cbec8610ec5aaf35df50094ff639febc23f20773","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/overlayfs/copy_up.c","fs/overlayfs/readdir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.15","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/copy_up.c","fs/overlayfs/readdir.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/43ad4a3090e1c2a0c34e9802882b42c5c078d556"},{"url":"https://git.kernel.org/stable/c/7805739ce4577f2c53f5a30be2d48e83e91c63bc"},{"url":"https://git.kernel.org/stable/c/ea5327a9228bfd1609e54f1fca50786e8f963da5"},{"url":"https://git.kernel.org/stable/c/cbec8610ec5aaf35df50094ff639febc23f20773"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - open() reaches the patched ovl_dir_open() through do_dentry_open(), and getdents64() reaches ovl_iterate() through iterate_dir(), racing ovl_copy_up_workdir(). creat(), open(O_WRONLY), and chmod() enter that function via ovl_copy_up(), ovl_copy_up_one(), and ovl_do_copy_up().\nAC:L - The same caller runs the copy-up and the racing open/getdents. ovl_copy_up_workdir() stored __upperdentry in ovl_inode_update() and only afterwards set_bit(OVL_WHITEOUTS); ovl_dir_open() read ovl_path_real() and ovl_dir_is_real() with neither i_rwsem nor OVL_I(inode)->lock held, so repeating that pair hits the window.\nPR:L - ovl_permission() authorizes the directory owner through generic_permission() and checks no capability. That user can open and getdents the directory, and can force ovl_copy_up() from ovl_create(), from ovl_maybe_copy_up() on a write open, or from ovl_setattr() when chmod or chown touches a file they own.\nUI:N - The attacker personally issues open, getdents64, and the create, write-open, or chmod that calls ovl_copy_up() on a single-lower directory that does not yet have an upper.\nS:U - The object freed is the overlay directory cache OVL_I(inode)->cache in the kernel that handled the getdents. Turning that use-after-free into code execution is privilege escalation in that same kernel.\nC:H - A real-mode getdents takes ovl_iterate_real() into ovl_cache_get_impure(), which ovl_dir_cache_free()s OVL_I(inode)->cache and its ovl_cache_entry list without reading refcount. The other fd's ovl_iterate_merged() then dir_emit()s p->name and p->len from that freed entry into the getdents64 buffer.\nI:H - ovl_iterate_merged() writes the freed ovl_cache_entry: ovl_cache_update() stores p->ino and p->is_whiteout, and the cursor follows p->l_node.next. After the slab is reused those stores corrupt the object that now occupies the entry.\nA:H - ovl_dir_cache_free() kfree()s the ovl_dir_cache while another descriptor's od->cache still points at it. The next ovl_iterate_merged() dereferences od->cache->entries and the freed ovl_cache_entry list, which oopses the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-22T11:08:10.254Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.15","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}