FKIE_CVE-2026-99640
Vulnerability from fkie_nvd - Published: 2026-11-20 06:17 - Updated: 2026-11-20 06:17
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved:
ovl: do not let chattr change the casefold flag
chattr +F or -F on an overlay directory can make the directory, or the
whole mount, unusable. Lookups of the directory, and lookups in it, then
fail. From code inspection, the caller only needs to own the directory.
The upper filesystem must support casefolding: ext4 or f2fs with the
casefold feature, or tmpfs with the casefold option.
chattr +F and -F set and clear FS_CASEFOLD_FL, the casefold flag of a
directory. The flag enables casefolding (case-insensitive name lookup)
for the directory. All directories of an overlay must match the casefold
state that was recorded at mount time, and ovl_lookup_single() enforces
this:
- A lookup in a directory that does not match fails with -ESTALE.
- A lookup of the directory itself fails with -EREMOTE.
ovl_fileattr_set() copies the directory up, which creates it in the
upper layer if it only existed in a lower layer. It then passes
FS_CASEFOLD_FL on to the upper filesystem. The upper filesystem accepts
the change if the upper directory is empty, regardless of what the
merged directory contains. The merged directory is the one that the user
sees, with the names from the upper and the lower directories.
After the change the upper directory no longer matches the mount. If the
directory is the root of the overlay, the whole mount is affected.
The flag can also change without chattr +F or -F. chattr reads all flags
of a directory, changes one and writes all of them back. For a directory
that only exists in a lower layer, overlayfs reads the flags from the
lower filesystem. xfs with the ascii-ci feature reports FS_CASEFOLD_FL
on every inode, but never sets S_CASEFOLD, the inode flag that overlayfs
compares with the mount. So its directories count as not casefolded.
With a lower layer on such an xfs and an upper layer on ext4 with the
casefold feature, chattr +A on a lower-only directory therefore sets
FS_CASEFOLD_FL on the new, empty upper directory.
Reproduced as root on tmpfs and on ext4 with chattr +F or -F on an
overlay directory whose upper directory was empty. Afterwards lookups
below it failed with ESTALE, and lookups of the directory itself failed
with EREMOTE. The chattr +A case was seen once, on a kernel with an
earlier form of this patch that still passed the caller's flag on:
lookups of the directory failed with EREMOTE.
Fix this by returning -EOPNOTSUPP if FS_IOC_SETFLAGS, the only call that
can change the flag, asks for a casefold flag on a directory that does
not agree with the casefold state of the mount. This also refuses the
chattr +A case above.
[amir: check the flag against the casefold state of the mount instead of
reading back the flags]
References
Impacted products
| Vendor | Product | Version |
|---|
{
"affected": [
{
"affectedData": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"fs/overlayfs/inode.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "ba93074fc1ae11a6c33bb2752ccae6304ab1668e",
"status": "affected",
"version": "083957f9614a8b2e284dbb3a85c5fec8e2fb26b8",
"versionType": "git"
},
{
"lessThan": "0f21cfc2a16f79b52cae10649b0f001fe6ffbf9d",
"status": "affected",
"version": "083957f9614a8b2e284dbb3a85c5fec8e2fb26b8",
"versionType": "git"
},
{
"lessThan": "83b351c3ade542bbfa1073e8c2d919826628252a",
"status": "affected",
"version": "083957f9614a8b2e284dbb3a85c5fec8e2fb26b8",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"fs/overlayfs/inode.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "6.17"
},
{
"lessThan": "6.17",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.18.*",
"status": "unaffected",
"version": "6.18.64",
"versionType": "semver"
},
{
"lessThanOrEqual": "7.3.*",
"status": "unaffected",
"version": "7.3.5",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "7.4-rc2",
"versionType": "original_commit_for_fix"
}
]
}
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\novl: do not let chattr change the casefold flag\n\nchattr +F or -F on an overlay directory can make the directory, or the\nwhole mount, unusable. Lookups of the directory, and lookups in it, then\nfail. From code inspection, the caller only needs to own the directory.\nThe upper filesystem must support casefolding: ext4 or f2fs with the\ncasefold feature, or tmpfs with the casefold option.\n\nchattr +F and -F set and clear FS_CASEFOLD_FL, the casefold flag of a\ndirectory. The flag enables casefolding (case-insensitive name lookup)\nfor the directory. All directories of an overlay must match the casefold\nstate that was recorded at mount time, and ovl_lookup_single() enforces\nthis:\n\n- A lookup in a directory that does not match fails with -ESTALE.\n- A lookup of the directory itself fails with -EREMOTE.\n\novl_fileattr_set() copies the directory up, which creates it in the\nupper layer if it only existed in a lower layer. It then passes\nFS_CASEFOLD_FL on to the upper filesystem. The upper filesystem accepts\nthe change if the upper directory is empty, regardless of what the\nmerged directory contains. The merged directory is the one that the user\nsees, with the names from the upper and the lower directories.\n\nAfter the change the upper directory no longer matches the mount. If the\ndirectory is the root of the overlay, the whole mount is affected.\n\nThe flag can also change without chattr +F or -F. chattr reads all flags\nof a directory, changes one and writes all of them back. For a directory\nthat only exists in a lower layer, overlayfs reads the flags from the\nlower filesystem. xfs with the ascii-ci feature reports FS_CASEFOLD_FL\non every inode, but never sets S_CASEFOLD, the inode flag that overlayfs\ncompares with the mount. So its directories count as not casefolded.\nWith a lower layer on such an xfs and an upper layer on ext4 with the\ncasefold feature, chattr +A on a lower-only directory therefore sets\nFS_CASEFOLD_FL on the new, empty upper directory.\n\nReproduced as root on tmpfs and on ext4 with chattr +F or -F on an\noverlay directory whose upper directory was empty. Afterwards lookups\nbelow it failed with ESTALE, and lookups of the directory itself failed\nwith EREMOTE. The chattr +A case was seen once, on a kernel with an\nearlier form of this patch that still passed the caller\u0027s flag on:\nlookups of the directory failed with EREMOTE.\n\nFix this by returning -EOPNOTSUPP if FS_IOC_SETFLAGS, the only call that\ncan change the flag, asks for a casefold flag on a directory that does\nnot agree with the casefold state of the mount. This also refuses the\nchattr +A case above.\n\n[amir: check the flag against the casefold state of the mount instead of\n reading back the flags]"
}
],
"id": "CVE-2026-99640",
"lastModified": "2026-11-20T06:17:57.380",
"metrics": {},
"published": "2026-11-20T06:17:57.380",
"references": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/0f21cfc2a16f79b52cae10649b0f001fe6ffbf9d"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/83b351c3ade542bbfa1073e8c2d919826628252a"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/ba93074fc1ae11a6c33bb2752ccae6304ab1668e"
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"vulnStatus": "Received"
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.
Loading…