CVE-2026-99422: ovl: use the pinned upper dir in ovl_fix_origin()
In the Linux kernel, the following vulnerability has been resolved:
ovl: use the pinned upper dir in ovlfixorigin()
Renames made directly on the upper filesystem during a lookup crash the kernel.
A dentry that is passed to vfssetxattr() must be pinned. ovlfixorigin() passes upper->dparent to ovlsetimpure() without a reference, and the lookup holds no lock of the upper directory. A rename on the upper filesystem changes dparent, and only the child pins the new parent, so a second rename and an rmdir free it.
With delays in ovlfixorigin() and ovlsetimpure(), renaming the upper directory twice and removing the intermediate parent during the lookup of a merge directory without an origin xattr gave a KASAN use-after-free in vfssetxattr().
Fix this by passing the upper dentry that the overlay parent holds.
[amir: add helper ovlsetimpuredir()]
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.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2