[PATCH 08/13] ipe: handle errors from resolving the real inode
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sun Nov 15 14:07:24 UTC 2026
> d_real() is about to be able to fail for D_REAL_DATA. So switch
> ipe_build_eval_ctx() from d_real_inode() to d_real_data_inode() and deal
> with the error.
>
> Currently, if overlayfs fails to resolve the data of a file it hands
> back the overlayfs inode and IPE evaluates the policy against that. The
> overlayfs inode has neither a block device nor any fs-verity state so
> none of the properties of the file hosting the data are visible.
>
> Remember the error in the evaluation context and if a policy is loaded
> refuse the operation with -EACCES without looking at the rules. That's
> what IPE returns for every denial and what IMA returns when it can't
> appraise a file. Permissive mode allows it like any other denial and
> without a policy IPE still allows everything.
>
> Note that the operation wouldn't necessarily fail on its own. overlayfs
> doesn't verify the data again on mmap() so a file whose data can't be
> resolved could otherwise be mapped executable.
>
> This is a no-op until d_real() can actually fail.
>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261115-work-ovl-d_real-v1-0-ca155efbcb2e@kernel.org?part=8
More information about the Linux-security-module-archive
mailing list