In the Linux kernel, the following vulnerability has been resolved:
ovl: fix whiteout creation in casefolded directories
unlink and rmdir fail with EINVAL on an overlay with casefolded (case-insensitive) layers, if the name exists in a lower layer. Casefolded layers need CONFIG_UNICODE. Root can mount such an overlay, and so can an unprivileged user in a user namespace, with tmpfs layers.
Overlayfs does not change a lower layer. To remove a name that exists there, it hides the name with a marker file, a whiteout. It creates the whiteout in the work directory, a scratch directory on the upper filesystem, and renames it over the name in the upper directory:
With casefolded directories, both dentries can be unhashed:
The cleanup after the failure also refuses an unhashed dentry, so on ext4 the whiteout is left behind in the work directory.
Reproduced with rm and rmdir on casefolded tmpfs and ext4 layers, also as uid 1000 in a user namespace.
Fix this by creating the whiteout with ovl_create_temp(), which repeats the lookup if the new dentry is unhashed. Prepare the rename with start_renaming_dentry(), which looks up the target name with the directories locked. The caller looked the name up without a lock, so return -ESTALE if the name now refers to a different inode.
[amir: pass the name used for lookup instead of taking a name snapshot]
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99639.json"
}