Re: [PATCH 4/4] integrity: Load mokx variables into the blacklist keyring

From: Dimitri John Ledkov
Date: Wed May 05 2021 - 06:01:22 EST

On Sat, Mar 13, 2021 at 2:40 PM Eric Snowberg <eric.snowberg@xxxxxxxxxx> wrote:
> > On Mar 13, 2021, at 1:13 AM, David Howells <dhowells@xxxxxxxxxx> wrote:
> >
> > Eric Snowberg <eric.snowberg@xxxxxxxxxx> wrote:
> >
> >> If MOKx will be available thru a config table in the next shim,
> >> I'll prepare a follow on patch to add this support.
> >
> > Can this go separately, or would it be better rolled into the existing
> > patchset?
> IMHO, since you have already sent a pull request and this is not available
> yet in shim, it seems save to have it go separately. I should have time
> to send something out next week to address this change.

I don't think that was correct to call it "not available yet in shim".
Shim has always exported all the variables, it's just at the time most
shims from most distros did not have any contents in MokX. And as
usual with all EFI variables, empty ones do not exist.

The shim from Ubuntu which is now public contains 1 cert & 378 on
x86_64 and 1 cert & 170 hashes. Thus it is likely to fail to be read
by kernel correctly unless it uses efi_mokvar_entry_find(). These
patches are tagged with CVE number which it does not address
completely in some configurations. Are you working on a patch to add
efi_mokvar_entry_find() or do you want me to write it / test it /
submit it for review?