{"id":"CVE-2026-142810","summary":"ovl: check the casefold flag of directories only","details":"In the Linux kernel, the following vulnerability has been resolved:\n\novl: check the casefold flag of directories only\n\nOn an overlay over casefolded (case-insensitive) directories, every\nlookup of a file that is not a directory fails with EREMOTE, and the\nfirst file create triggers a kernel warning. No privilege is needed: an\nunprivileged user can cause both in a user namespace, with the layers on\na tmpfs that they have mounted with the casefold option.\n\nSome filesystems support casefolding, which is case-insensitive name\nlookup. It is enabled per directory, and the inode of a casefolded\ndirectory has the S_CASEFOLD flag.\n\noverlayfs accepts layers on a filesystem that supports casefolding as\nlong as casefolding is enabled on every directory of the layers, or on\nnone. The mount records which of the two applies in ofs-\u003ecasefold.\novl_lookup_single() compares the S_CASEFOLD flag of each file that it\nfinds against ofs-\u003ecasefold and returns -EREMOTE on a mismatch.\n\nFilesystems only set S_CASEFOLD on directories, so with casefolded\nlayers a regular file, a symlink or a special file never matches and its\nlookup fails.\n\novl_get_inode() does the same comparison in a WARN_ON_ONCE() for each\nnew overlay inode. A failed lookup never gets that far, so it is the\nfirst file create that trips the warning.\n\nReproduced on an overlay over casefolded tmpfs or ext4 directories, with\nstat() of a regular file, a symlink and a FIFO, and with a file create:\neach stat() failed with EREMOTE. For an unprivileged user in a user\nnamespace, on tmpfs, stat() of a regular file failed in the same way,\nand the file create triggered the warning.\n\nFix this by limiting both checks to directories.","modified":"2026-12-03T05:00:40.680770974Z","published":"2026-12-03T03:17:42.224Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142810.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1d27da7de3f74405b1de85ad26c5ea90f826114b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6a49ab7c9a68ad9ace8c7fb6fdd7126f4f3411c8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d3cd02c8c6917f36f635d82575a9b206531bbfea"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142810.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142810"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"16754d61dc69cb4550225a967a2639809226de42"},{"fixed":"6a49ab7c9a68ad9ace8c7fb6fdd7126f4f3411c8"},{"fixed":"d3cd02c8c6917f36f635d82575a9b206531bbfea"},{"fixed":"1d27da7de3f74405b1de85ad26c5ea90f826114b"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142810.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.18.0"},{"fixed":"6.18.61"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142810.json"}}],"schema_version":"1.9.2"}