[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <B135AC90-7CE5-4E51-90B1-9D82031668A8@oracle.com>
Date: Tue, 3 Dec 2024 20:06:14 +0000
From: Eric Snowberg <eric.snowberg@...cle.com>
To: Roberto Sassu <roberto.sassu@...weicloud.com>
CC: Mimi Zohar <zohar@...ux.ibm.com>,
Dmitry Kasatkin
<dmitry.kasatkin@...il.com>,
"corbet@....net" <corbet@....net>,
"mcgrof@...nel.org" <mcgrof@...nel.org>,
"petr.pavlu@...e.com"
<petr.pavlu@...e.com>,
"samitolvanen@...gle.com" <samitolvanen@...gle.com>,
"da.gomez@...sung.com" <da.gomez@...sung.com>,
Andrew Morton
<akpm@...ux-foundation.org>,
"paul@...l-moore.com" <paul@...l-moore.com>,
"jmorris@...ei.org" <jmorris@...ei.org>,
"serge@...lyn.com"
<serge@...lyn.com>,
"shuah@...nel.org" <shuah@...nel.org>,
"mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
"alexandre.torgue@...s.st.com" <alexandre.torgue@...s.st.com>,
"linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"linux-kselftest@...r.kernel.org"
<linux-kselftest@...r.kernel.org>,
"wufan@...ux.microsoft.com"
<wufan@...ux.microsoft.com>,
"pbrobinson@...il.com" <pbrobinson@...il.com>,
"zbyszek@...waw.pl" <zbyszek@...waw.pl>, "hch@....de" <hch@....de>,
"mjg59@...f.ucam.org" <mjg59@...f.ucam.org>,
"pmatilai@...hat.com"
<pmatilai@...hat.com>,
"jannh@...gle.com" <jannh@...gle.com>,
"dhowells@...hat.com" <dhowells@...hat.com>,
"jikos@...nel.org"
<jikos@...nel.org>,
"mkoutny@...e.com" <mkoutny@...e.com>,
"ppavlu@...e.com"
<ppavlu@...e.com>,
"petr.vorel@...il.com" <petr.vorel@...il.com>,
"mzerqung@...inter.de" <mzerqung@...inter.de>,
"kgold@...ux.ibm.com"
<kgold@...ux.ibm.com>,
Roberto Sassu <roberto.sassu@...wei.com>
Subject: Re: [PATCH v6 00/15] integrity: Introduce the Integrity Digest Cache
> On Nov 26, 2024, at 3:41 AM, Roberto Sassu <roberto.sassu@...weicloud.com> wrote:
>
> On Tue, 2024-11-26 at 00:13 +0000, Eric Snowberg wrote:
>>
>>> On Nov 19, 2024, at 3:49 AM, Roberto Sassu <roberto.sassu@...weicloud.com> wrote:
>>>
>>> From: Roberto Sassu <roberto.sassu@...wei.com>
>>>
>>> The Integrity Digest Cache can also help IMA for appraisal. IMA can simply
>>> lookup the calculated digest of an accessed file in the list of digests
>>> extracted from package headers, after verifying the header signature. It is
>>> sufficient to verify only one signature for all files in the package, as
>>> opposed to verifying a signature for each file.
>>
>> Is there a way to maintain integrity over time? Today if a CVE is discovered
>> in a signed program, the program hash can be added to the blacklist keyring.
>> Later if IMA appraisal is used, the signature validation will fail just for that
>> program. With the Integrity Digest Cache, is there a way to do this?
>
> As far as I can see, the ima_check_blacklist() call is before
> ima_appraise_measurement(). If it fails, appraisal with the Integrity
> Digest Cache will not be done.
It is good the program hash would be checked beforehand and fail if it is
contained on the list.
The .ima keyring may contain many keys. If one of the keys was later
revoked and added to the .blacklist, wouldn't this be missed? It would
be caught during signature validation when the file is later appraised, but
now this step isn't taking place. Correct?
With IMA appraisal, it is easy to maintain authenticity but challenging to
maintain integrity over time. In user-space there are constantly new CVEs.
To maintain integrity over time, either keys need to be rotated in the .ima
keyring or program hashes need to be frequently added to the .blacklist.
If neither is done, for an end-user on a distro, IMA-appraisal basically
guarantees authenticity.
While I understand the intent of the series is to increase performance,
have you considered using this to give the end-user the ability to maintain
integrity of their system? What I mean is, instead of trying to import anything
from an RPM, just have the end-user provide this information in some format
to the Digest Cache. User-space tools could be built to collect and format
the data needed by the Digest Cache. This data may allow multiple versions
of the same program. The data would then be signed by one of the system
kernel keys (either something in the secondary or machine keyring), to maintain
a root of trust. This would give the end-user the ability to have integrity however
they see fit. This leaves the distro to provide signed programs and the end-user
the ability to decide what level of software they want to run on their system. If
something isn't in the Digest Cache, it gets bumped down to the traditional
IMA-appraisal. I think it would simplify the problem you are trying to solve,
especially around the missing kernel PGP code required for all this to work,
since it wouldn't be necessary. With this approach, besides the performance
gain, the end-user would gain the ability to maintain integrity that is enforced by
the kernel.
Powered by blists - more mailing lists