[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3f8cc7c9462353ac2eef58e39beee079bdd9c7b4.camel@linux.ibm.com>
Date: Mon, 16 Nov 2020 13:35:11 -0500
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>
Cc: Roberto Sassu <roberto.sassu@...wei.com>,
"linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Silviu Vlasceanu <Silviu.Vlasceanu@...wei.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [RESEND][PATCH] ima: Set and clear FMODE_CAN_READ in
ima_calc_file_hash()
On Mon, 2020-11-16 at 10:09 -0800, Linus Torvalds wrote:
> On Mon, Nov 16, 2020 at 9:41 AM Christoph Hellwig <hch@...radead.org> wrote:
> >
> > The "issue" with IMA is that it uses security hooks to hook into the
> > VFS and then wants to read every file that gets opened on a real file
> > system to "measure" the contents vs a hash stashed away somewhere.
>
> Well, but that's easy enough to handle: if the open isn't a read open,
> then the old contents don't matter, so you shouldn't bother to measure
> the file.
>
> So this literally sounds like a "doctor, doctor, it hurts when I hit
> my head with a hammer" situation..
We need to differentiate between signed files, which by definition are
immutable, and those that are mutable. Appending to a mutable file,
for example, would result in the file hash not being updated.
Subsequent reads would fail.
Mimi
Powered by blists - more mailing lists