From: Jarkko Sakkinen <jarkko@kernel.org>
To: Andrew Zaborowski <andrew.zaborowski@intel.com>
Cc: keyrings@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: Re: [PATCH][RESEND#15] keys: Handle missing Authority Key Identifier X509 extension
Date: Sun, 10 Jan 2021 06:45:09 +0200 [thread overview]
Message-ID: <X/qGVSXVoTeEks/j@kernel.org> (raw)
In-Reply-To: <20210104164048.1378237-1-andrew.zaborowski@intel.com>
On Mon, Jan 04, 2021 at 05:40:47PM +0100, Andrew Zaborowski wrote:
> In a self-signed certificate the subject and issuer are the same and so
> the Authority Key Identifier X.509 v3 extension is explicitly made
> optional in RFC5280 section 4.2.1.1.
> crypto/asymmetric_keys/x509_cert_parser.c can't handle this and makes
> (at least) the restrict.c functions refuse to work with certificates
> that don't include the AKID. Fix this by filling in the missing
> cert->sig->auth_ids with the certificate's own IDs after parsing and
> determinig the certificate is self-signed.
>
> The asymmetric_key_generate_id return value is not checked because it's
> already succeeded once at this point.
>
> There are root X.509 v3 certificates in use where this is the case,
> mostly oldish ones.
>
> Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
> Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
I'll take active role with these.
I don't think that adding field data that does not exist is a great
idea.
I think that a more sane way to fix this issue, would be to add field
'self_signed' to 'struct public_key_signature', and remove the
equivalent field from 'struct x509_certificate'.
Minor updates are required to:
- x509_check_for_self_signed()
- pkcs7_verify_sig_chain()
Then you can use then new field to refine the check in
restrict_link_by_signature().
/Jarkko
next prev parent reply other threads:[~2021-01-10 4:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 16:40 [PATCH][RESEND#15] keys: Handle missing Authority Key Identifier X509 extension Andrew Zaborowski
2021-01-04 16:40 ` [PATCH][RESEND] keys: Update comment for restrict_link_by_key_or_keyring_chain Andrew Zaborowski
2021-01-10 4:51 ` Jarkko Sakkinen
2021-01-10 4:45 ` Jarkko Sakkinen [this message]
2021-01-11 14:27 ` [PATCH][RESEND#15] keys: Handle missing Authority Key Identifier X509 extension Andrew Zaborowski
2021-01-12 1:40 ` Jarkko Sakkinen
2021-01-13 14:31 ` Andrew Zaborowski
2021-01-14 3:19 ` Jarkko Sakkinen
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=X/qGVSXVoTeEks/j@kernel.org \
--to=jarkko@kernel.org \
--cc=andrew.zaborowski@intel.com \
--cc=dhowells@redhat.com \
--cc=keyrings@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.