Re: [RFC 2/2] ima: Fix detection of read/write violations on stacked filesystems
From: Mimi Zohar
Date: Tue Apr 16 2024 - 08:18:42 EST
On Tue, 2024-04-16 at 10:05 +0200, Miklos Szeredi wrote:
> On Mon, 15 Apr 2024 at 20:35, Mimi Zohar <zohar@xxxxxxxxxxxxx> wrote:
>
> > Although "Changes to the underlying filesystems while part of a mounted overlay
> > filesystem are not allowed.", from an integrity perspective these changes might
> > affect overlay files. So they need to be detected and possibly re-measured, re-
> > appraised, and/or re-audited [1, 2].
>
> How are changes of non-overlay files detected?
Originally there was a single measureent unless the filesystem was mounted with
SB_I_VERSION. With commit a2a2c3c8580a ("ima: Use i_version only when
filesystem supports it") this changed to always re-measure the file if the
filesystem wasn't mounted with SB_I_VERSION.
With commit db1d1e8b9867 ("IMA: use vfs_getattr_nosec to get the i_version")
it's not directly accessing i_version.
thanks,
Mimi