# CVE-2026-99641: ovl: fail the mount if the casefold flag has changed

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2026-11-20T05:49:56.818Z
- Modified: 2026-11-20T06:17:57.540Z
- Assigned by: Linux

## Description

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.

ovl_mount_dir_check() 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
FSCONFIG_CMD_CREATE.

The casefold flag of an empty directory can be changed.

The casefold flag of the overlay root must match ofs->casefold.
ovl_get_root() copies the flag from the topmost layer root, as it is
when the mount is created. On a mismatch, ovl_get_root() only does a
WARN_ON(), and the mount continues. The check is not a WARN_ON_ONCE(),
so each such mount warns again.

An unprivileged user needs CONFIG_UNICODE, 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 FSCONFIG_CMD_CREATE, with tmpfs and
ext4 layers, and as uid 1000 in a user namespace.

Fix this by replacing the WARN_ON() with a check that fails the mount
with -EINVAL.

(As written by CVE List.)

## Affected

- Linux Linux: from f9377faaeae0473ea45f2b6d3ff758e192f3f01d before f182e7bc11c401d09f890ee1a3ec359670e1e308; from f9377faaeae0473ea45f2b6d3ff758e192f3f01d before 549fb7c77951ad9ddfed05ce1776f497538ad13e; from f9377faaeae0473ea45f2b6d3ff758e192f3f01d before c782fc8ada811569811c0fdea5c3412511be95d0; 6.18 (not affected: before 6.18; from 6.18.64 up to 6.18.*; from 7.3.5 up to 7.3.*; from 7.4-rc2 up to *)

## References

- <https://git.kernel.org/stable/c/f182e7bc11c401d09f890ee1a3ec359670e1e308>
- <https://git.kernel.org/stable/c/549fb7c77951ad9ddfed05ce1776f497538ad13e>
- <https://git.kernel.org/stable/c/c782fc8ada811569811c0fdea5c3412511be95d0>

## Sources

- CVE List: [CVE-2026-99641](https://www.cve.org/CVERecord?id=CVE-2026-99641), CVE Terms of Use, modified 2026-11-20
- NVD: [CVE-2026-99641](https://nvd.nist.gov/vuln/detail/CVE-2026-99641), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-99641 · Whole record: https://cve.day/CVE-2026-99641.json · Rebuilt by cve.day 2026-11-25T22:59:52.291Z
