Skip to content

Commit 18b44bc

Browse files
esnowbergtorvalds
authored andcommitted
ovl: Always reevaluate the file signature for IMA
Commit db1d1e8 ("IMA: use vfs_getattr_nosec to get the i_version") partially closed an IMA integrity issue when directly modifying a file on the lower filesystem. If the overlay file is first opened by a user and later the lower backing file is modified by root, but the extended attribute is NOT updated, the signature validation succeeds with the old original signature. Update the super_block s_iflags to SB_I_IMA_UNVERIFIABLE_SIGNATURE to force signature reevaluation on every file access until a fine grained solution can be found. Signed-off-by: Eric Snowberg <[email protected]> Signed-off-by: Mimi Zohar <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9f91164 commit 18b44bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/overlayfs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ int ovl_fill_super(struct super_block *sb, struct fs_context *fc)
14601460
ovl_trusted_xattr_handlers;
14611461
sb->s_fs_info = ofs;
14621462
sb->s_flags |= SB_POSIXACL;
1463-
sb->s_iflags |= SB_I_SKIP_SYNC;
1463+
sb->s_iflags |= SB_I_SKIP_SYNC | SB_I_IMA_UNVERIFIABLE_SIGNATURE;
14641464

14651465
err = -ENOMEM;
14661466
root_dentry = ovl_get_root(sb, ctx->upper.dentry, oe);

0 commit comments

Comments
 (0)