CVE-2026-143052: ovl: do not read the flags of a put upper dentry in lookup
In the Linux kernel, the following vulnerability has been resolved:
ovl: do not read the flags of a put upper dentry in lookup
ovllookuplayers() passes ctx->upperdentry to ovlgetinode(), which takes over the reference. If an overlay inode for the upper inode is already cached, as for a second hard link, ovlgetinode() puts the dentry and returns the cached inode. ovllookuplayers() then passes the put dentry to ovldentryinitreval(), which reads its dflags.
With a local upper fs the put dentry usually stays in the dcache, but with a FUSE upper whose entry has timed out, dput() kills it, so this is a use-after-free.
Fix this by taking the revalidate flags from the upper dentry of the overlay inode, which is the one that ovldentryrevalidatecommon() revalidates.