From: Mimi Zohar <zohar@linux.ibm.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Stefan Berger <stefanb@linux.ibm.com>,
Amir Goldstein <amir73il@gmail.com>,
linux-integrity@vger.kernel.org, linux-unionfs@vger.kernel.org,
linux-kernel@vger.kernel.org, roberto.sassu@huawei.com,
Christian Brauner <brauner@kernel.org>
Subject: Re: [RFC 2/2] ima: Fix detection of read/write violations on stacked filesystems
Date: Mon, 15 Apr 2024 14:34:56 -0400 [thread overview]
Message-ID: <52645fb25b424e10e68f0bde3b80906bbf8b9a37.camel@linux.ibm.com> (raw)
In-Reply-To: <CAJfpegvPwpS5_S4qrrVbeC1RovP8jeNuDCYLbdcZ_XDFgfgftQ@mail.gmail.com>
On Mon, 2024-04-15 at 14:57 +0200, Miklos Szeredi wrote:
> On Mon, 15 Apr 2024 at 12:47, Mimi Zohar <zohar@linux.ibm.com> wrote:
> > It's queued in
> > https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git/
> > next-
> > integrity branch and should be linux-next.
>
> Is there a document about ima/evm vs. overlayfs?
Not yet.
>
> What exactly is it trying to achieve and how?
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].
Saying, "If the underlying filesystem is changed, the behavior of the overlay is
undefined, though it will not result in a crash or deadlock." does not address
the concerns about the integrity of the overlay file being accessed.
Initially we disabled EVM on overlay, since calculating the overlay EVM HMAC,
could result in taking an invalid HMAC value and making it valid. Stefan's EVM
patch set addresses this by only copying up the EVM portable & immutable
signature [3, 4].
Lastly, if a file is being opened for read, but is already opened for write, or
the reverse, the file measurement is meaningless. A violation is audited and
the IMA measurement list is invalidated. This patch set similarly addresses the
case where the underlying file is already opened for write and the overlay file
is being opened for read.
[1] Commit 18b44bc5a672 ("ovl: Always reevaluate the file signature for IMA")
forced signature re-evaulation on every file access.
[2] Commit b836c4d29f27 (ima: detect changes to the backing overlay file)
[3]
https://lore.kernel.org/linux-integrity/20231219175206.12342-1-zohar@linux.ibm.com/
[4]
https://lore.kernel.org/linux-integrity/20240223172513.4049959-1-stefanb@linux.ibm.com/
thanks,
Mimi
next prev parent reply other threads:[~2024-04-15 18:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 14:01 [RFC 0/2] ima: Fix detection of read/write violations on stacked filesystems Stefan Berger
2024-04-12 14:01 ` [RFC 1/2] ovl: Define D_REAL_FILEDATA for d_real to return dentry with data Stefan Berger
2024-04-12 18:05 ` Amir Goldstein
2024-04-12 14:01 ` [RFC 2/2] ima: Fix detection of read/write violations on stacked filesystems Stefan Berger
2024-04-12 18:08 ` Amir Goldstein
2024-04-12 19:08 ` Stefan Berger
2024-04-15 8:09 ` Miklos Szeredi
2024-04-15 10:47 ` Mimi Zohar
2024-04-15 12:57 ` Miklos Szeredi
2024-04-15 18:34 ` Mimi Zohar [this message]
2024-04-16 8:05 ` Miklos Szeredi
2024-04-16 12:18 ` Mimi Zohar
2024-04-16 14:46 ` Miklos Szeredi
2024-04-16 19:05 ` Mimi Zohar
2024-04-23 11:06 ` Miklos Szeredi
2024-05-01 21:13 ` Mimi Zohar
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=52645fb25b424e10e68f0bde3b80906bbf8b9a37.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=roberto.sassu@huawei.com \
--cc=stefanb@linux.ibm.com \
/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