CVE-2026-99641: ovl: fail the mount if the casefold flag has changed
In the Linux kernel, the following vulnerability has been resolved:
ovl: fail the mount if the casefold flag has changed
An unprivileged user in a user namespace can repeatedly trigger a kernel warning with their own overlay mounts. They do so by changing the casefold flag of the topmost layer's empty root, the top directory of that layer, after the layers are set and before the mount is created.
The casefold flag of a directory makes name lookups in that directory case-insensitive. All layers of an overlay must agree on casefolding.
ovlmountdircheck() reads the casefold flag of a layer root when fsconfig() sets that layer, and saves the result in ofs->casefold. The mount is created later, by another fsconfig() call with FSCONFIGCMDCREATE.
The casefold flag of an empty directory can be changed.
The casefold flag of the overlay root must match ofs->casefold. ovlgetroot() copies the flag from the topmost layer root, as it is when the mount is created. On a mismatch, ovlgetroot() only does a WARNON(), and the mount continues. The check is not a WARNONONCE(), so each such mount warns again.
An unprivileged user needs CONFIGUNICODE, and a tmpfs mounted with the casefold option in their namespace.
Reproduced by changing the casefold flag of the empty upper directory after the layers were set and before FSCONFIGCMDCREATE, with tmpfs and ext4 layers, and as uid 1000 in a user namespace.
Fix this by replacing the WARNON() with a check that fails the mount with -EINVAL.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.5-1
Event History
Frequently Asked Questions
Who can trigger the issue?
An unprivileged user in a user namespace can trigger it using their own overlay mounts. Exploitation also requires CONFIG_UNICODE and a tmpfs mounted with the casefold option.
What conditions are needed to reproduce the repeated warnings?
The attacker must set the overlay layers, then change the casefold flag on the empty root directory of the topmost layer before creating the overlay mount with FSCONFIG_CMD_CREATE. Repeating this sequence causes another kernel warning for each mount.
What is the practical impact?
The described impact is repeated kernel warnings caused by a casefold-state mismatch between the saved layer configuration and the topmost layer at mount creation. The mount continues despite the mismatch in the affected behavior.