linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Eric Snowberg <eric.snowberg@oracle.com>,
	David Howells <dhowells@redhat.com>
Cc: dwmw2@infradead.org, Jarkko Sakkinen <jarkko@kernel.org>,
	James.Bottomley@HansenPartnership.com, masahiroy@kernel.org,
	michal.lkml@markovi.net, jmorris@namei.org, serge@hallyn.com,
	ardb@kernel.org, Mimi Zohar <zohar@linux.ibm.com>,
	lszubowi@redhat.com, javierm@redhat.com,
	keyrings@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Tyler Hicks <tyhicks@linux.microsoft.com>
Subject: Re: Conflict with Mickaël Salaün's blacklist patches [was [PATCH v5 0/4] Add EFI_CERT_X509_GUID support for dbx/mokx entries]
Date: Wed, 10 Feb 2021 13:07:59 +0100	[thread overview]
Message-ID: <999f0763-b1c1-a9ad-0efe-d3e148663ced@digikod.net> (raw)
In-Reply-To: <456712ef-1349-ffe2-9e34-7d49848980ff@digikod.net>


On 09/02/2021 22:53, Mickaël Salaün wrote:
> 
> On 09/02/2021 00:05, Eric Snowberg wrote:
>>
>>> On Feb 6, 2021, at 11:30 AM, Mickaël Salaün <mic@digikod.net> wrote:
>>>
>>> On 06/02/2021 02:14, Eric Snowberg wrote:
>>>
>>>> I have done some additional testing, I am seeing a regression. The blacklist 
>>>> keyring is no longer picking up any of the hashes from the dbx during boot. 
>>>> I backed out the merge with my changes  (fdbbe7ceeb95090d09c33ce0497e0394c82aa33d) 
>>>> and still see the regression.  I then backed out Mickaël merge
>>>> (5bf1adccf5c41dbdd51d1f4de220d335d9548598) and it fixes the regression.
>>>>
>>>> On a x86 with the updated dbx from uefi.org, I’d expect to see 234 bin hash entries
>>>> in the blacklist keyring.  With the current merged code, there is none.
>>>
>>> Hum, I missed a part in refactoring (commit
>>> f78e50c8f750c0ac6767ac1ed006360cf77c56c4). :/
>>> Could you please test the following patch?
>>>
>>> diff --git a/certs/blacklist.c b/certs/blacklist.c
>>> index 07c592ae5307..f998a2e85ddc 100644
>>> --- a/certs/blacklist.c
>>> +++ b/certs/blacklist.c
>>> @@ -197,13 +197,16 @@ int mark_hash_blacklisted(const u8 *hash, size_t
>>> hash_len,
>>>                enum blacklist_hash_type hash_type)
>>> {
>>>        const char *buffer;
>>> +       int err;
>>>
>>>        buffer = get_raw_hash(hash, hash_len, hash_type);
>>>        if (IS_ERR(buffer))
>>>                return PTR_ERR(buffer);
>>> +       err = mark_raw_hash_blacklisted(buffer);
>>>        kfree(buffer);
>>> -       return 0;
>>> +       return err;
>>> }
>>
>> I applied this patch, it works better, but there is still a regression. 
>> Most of the hashes show up in the blacklist keyring now.  However some 
>> do not, here is what I see in the log during boot:
>>
>> [    2.321876] blacklist: Problem blacklisting hash (-13)
>> [    2.322729] blacklist: Problem blacklisting hash (-13)
>> [    2.323549] blacklist: Problem blacklisting hash (-13)
>> [    2.324369] blacklist: Problem blacklisting hash (-13)
>>
>>> Is it possible to test these kind of dbx blacklist with Qemu?
>>
>> Yes, just use OVMF. 
>>
> 
> My changes (with the fix) don't change the previous semantic. I just
> tested without my changes and with my changes (and the fix), and I get
> the same result: 184 bin hashes with
> https://uefi.org/sites/default/files/resources/dbxupdate_x64.bin
> 
> Could you please re-test and if there is still an issue bisect and share
> the certificates causing this issue?
> 
> David, do you want me to send the two new patches or an updated full
> patch series?
> 

I found the issue and fixed it in a new patch series:
https://lore.kernel.org/lkml/20210210120410.471693-1-mic@digikod.net/

  reply	other threads:[~2021-02-10 12:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 18:10 [PATCH v5 0/4] Add EFI_CERT_X509_GUID support for dbx/mokx entries Eric Snowberg
2021-01-22 18:10 ` [PATCH v5 1/4] certs: Add EFI_CERT_X509_GUID support for dbx entries Eric Snowberg
2021-01-28  3:54   ` Nayna
2021-01-28  4:11     ` Eric Snowberg
2021-01-28 15:35       ` Nayna
2021-01-28 15:58       ` David Howells
2021-01-29  1:56         ` Eric Snowberg
2021-01-22 18:10 ` [PATCH v5 2/4] certs: Move load_system_certificate_list to a common function Eric Snowberg
2021-01-22 18:10 ` [PATCH v5 3/4] certs: Add ability to preload revocation certs Eric Snowberg
2021-01-22 18:10 ` [PATCH v5 4/4] integrity: Load mokx variables into the blacklist keyring Eric Snowberg
2021-01-28 15:16 ` [PATCH v5 0/4] Add EFI_CERT_X509_GUID support for dbx/mokx entries David Howells
2021-01-28 15:27   ` Mimi Zohar
2021-01-28 15:29     ` Mimi Zohar
2021-01-28 15:41   ` Eric Snowberg
2021-02-03 16:26 ` Conflict with Mickaël Salaün's blacklist patches [was [PATCH v5 0/4] Add EFI_CERT_X509_GUID support for dbx/mokx entries] David Howells
2021-02-03 18:49   ` Mickaël Salaün
2021-02-04  3:53     ` Eric Snowberg
2021-02-04  8:26       ` Mickaël Salaün
2021-02-05  0:24         ` Eric Snowberg
2021-02-05 10:27           ` Mickaël Salaün
2021-02-06  1:14             ` Eric Snowberg
2021-02-06 18:30               ` Mickaël Salaün
2021-02-08 23:05                 ` Eric Snowberg
2021-02-09 21:53                   ` Mickaël Salaün
2021-02-10 12:07                     ` Mickaël Salaün [this message]
2021-02-09 13:14                 ` David Howells
2021-02-09 13:59                   ` Mickaël Salaün
2021-02-09 16:46                   ` David Howells
2021-02-12 11:49                   ` Jarkko Sakkinen
2021-02-04  9:11     ` David Howells

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=999f0763-b1c1-a9ad-0efe-d3e148663ced@digikod.net \
    --to=mic@digikod.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=ardb@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=eric.snowberg@oracle.com \
    --cc=jarkko@kernel.org \
    --cc=javierm@redhat.com \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lszubowi@redhat.com \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=serge@hallyn.com \
    --cc=tyhicks@linux.microsoft.com \
    --cc=zohar@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;
as well as URLs for NNTP newsgroup(s).