From: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
To: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Problem with new X.509 is_hash_blacklisted() interface
Date: Sat, 27 May 2017 08:05:25 -0700 [thread overview]
Message-ID: <1495897525.3458.7.camel@HansenPartnership.com> (raw)
Added by
commit 436529562df2748fd9918f578205b22cf8ced277
Author: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date: Mon Apr 3 16:07:25 2017 +0100
X.509: Allow X.509 certs to be blacklisted
Ironically it duplicates a UEFI bug we've been struggling with for a
while in the pkcs11 handlers: namely if you have a blacklist based on
certificate hashes, an interface which only takes a hash cannot
definitively tell you if the certificate is on the blacklist or not
because the hash the cert is blacklisted by may be a different
algorithm from the hash you feed in to is_hash_blacklisted(). This
means that the only safe way to use the interface is to construct every
possible hash of the cert and feed them one at a time into
is_hash_blacklisted(). This makes it an almost unusable API.
I suggest you deprecate this interface immediately and introduce an
is_cert_blacklisted() one which takes a pointer to the TBS data. Then
the implementation can loop over the blacklists, see the hash type and
construct the hash of the TBS data for comparison (caching the hashes
for efficiency). That way you'll be assured of a definitive answer and
an easy API.
It might be reasonable to cc linux-efi on future kernel keyring stuff,
because some of the other issues may have also come up in the UEFI
keyrings.
James
next reply other threads:[~2017-05-27 15:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-27 15:05 James Bottomley [this message]
[not found] ` <1495897525.3458.7.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2017-05-30 10:37 ` Problem with new X.509 is_hash_blacklisted() interface Ard Biesheuvel
2017-06-20 16:09 ` David Howells
[not found] ` <26151.1497974983-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-06-21 12:28 ` Ard Biesheuvel
2017-06-21 12:49 ` David Howells
[not found] ` <8099.1498049349-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-06-21 13:07 ` Ard Biesheuvel
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=1495897525.3458.7.camel@HansenPartnership.com \
--to=james.bottomley-d9phhud1jfjcxq6kfmz53/egyhegw8jk@public.gmane.org \
--cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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