AZL-114839: CVE-2026-99422 affecting package kernel 6.6.161.1-1
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.
- Compensating control
In ovl_fix_origin(), pass the pinned upper dentry held by the overlay parent to ovl_set_impure() instead of upper->d_parent.