From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Sascha Hauer <s.hauer@pengutronix.de>,
linux-integrity@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: kernel@pengutronix.de
Subject: Re: IMA/EVM writing xattrs during remount filesystem
Date: Mon, 26 Feb 2018 10:12:05 -0500 [thread overview]
Message-ID: <1519657925.3562.264.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180226142305.mbuuyibpvzzrcvbm@pengutronix.de>
Hi Sascha,
On Mon, 2018-02-26 at 15:23 +0100, Sascha Hauer wrote:
> Hi All,
>
> When a filesystem is remounted from rw to ro then
> sb_prepare_remount_readonly() is called. After this call there shouldn't
> be any writers left on the filesystem. However, IMA/EVM is not aware of
> this as it never calls mnt_want_write[_file](), but only looks add the
> MS_RDONLY superblock flag before writing to its xattrs. This flag is
> only changed after sb->s_op->remount_fs() is called. As a consequence
> IMA/EVM still updates xattrs while the filesystem is going to readonly
> mode.
>
> We observed that on a 4.0 Kernel in conjunction with UBIFS, but the
> relevant code in IMA/EVM still looks the same so I assume it's present
> in the current kernel aswell.
>
> UBIFS calculates its free space before and after the remount_fs op and
> if there's a difference it prints a backtrace (dbg_check_space_info:
> free space changed from x to y). We see this backtrace sometimes when
> remounting the fs readonly. If I understand the situation correctly this
> is not UBIFS's fault, right? Any hint what we can do about it?
Not updating the file hashes could result in verification errors. I
would classify updating the xattrs as working as designed. Wouldn't
you?
Perhaps the files changing should not be included in the IMA-appraisal
policy?
Mimi
next prev parent reply other threads:[~2018-02-26 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 14:23 IMA/EVM writing xattrs during remount filesystem Sascha Hauer
2018-02-26 15:12 ` Mimi Zohar [this message]
2018-02-26 15:38 ` Sascha Hauer
2018-02-26 16:03 ` Mimi Zohar
2018-02-27 7:27 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519657925.3562.264.camel@linux.vnet.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=kernel@pengutronix.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox