From: Eric Biggers <ebiggers@kernel.org>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: David Howells <dhowells@redhat.com>,
Alexander Krizhanovsky <ak@tempesta-tech.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH Strawman] crypto: Handle PEM-encoded x.509 certificates
Date: Sat, 13 Nov 2021 19:00:54 -0800 [thread overview]
Message-ID: <YZB75rDM9zoo4vXh@sol.localdomain> (raw)
In-Reply-To: <202C4936-FE6A-4422-A9BF-7DF47EF8BCC6@oracle.com>
On Sun, Nov 14, 2021 at 02:34:07AM +0000, Chuck Lever III wrote:
> > Adding kernel UAPIs expands the kernel's attack surface, causing security
> > vulnerabilities. It also increases the number of UAPIs that need to be
> > permanently supported. It makes no sense to add kernel UAPIs for things that
> > can be easily done in userspace.
> >
> > They work well as April Fools' jokes, though:
> > https://lore.kernel.org/r/1459463613-32473-1-git-send-email-richard@nod.at
> > Perhaps you meant to save your patch for April 1?
>
> That remark is uncalled for and out of line. Perhaps you just
> don't know what "strawman" means or why someone would post
> unfinished code to ask for direction. I'll mark that down to
> your inexperience.
>
> Interestingly, I don't see you listed as a maintainer in this
> area:
>
> $ scripts/get_maintainer.pl crypto/asymmetric_keys/
> David Howells <dhowells@redhat.com> (maintainer:ASYMMETRIC KEYS)
> Herbert Xu <herbert@gondor.apana.org.au> (maintainer:CRYPTO API)
> "David S. Miller" <davem@davemloft.net> (maintainer:CRYPTO API)
> keyrings@vger.kernel.org (open list:ASYMMETRIC KEYS)
> linux-crypto@vger.kernel.org (open list:CRYPTO API)
> linux-kernel@vger.kernel.org (open list)
> $
>
> I actually /have/ talked with one of these maintainers, and he
> suggested PEM decoding under add_key(2) would be appropriate and
> valuable. It actually wasn't my idea. I shall credit his idea in
> the next version of this patch so there won't be any further
> confusion.
It's not appropriate to add UAPIs with no regards for increasing the kernel's
attack surface, especially for things that can easily be done in userspace. The
kernel community is already struggling with thousands of syzbot reports and
constant security vulnerabilites. I understand that your patch is not yet
finished, but it doesn't really matter; this is no need for this patch at all as
you can just convert PEM => DER in userspace.
PEM decoding is just some data processing which can be implemented in userspace
in any programming language, so it's not fundamentally different from
sys_leftpad(). So in my opinion the comparison is relevant.
- Eric
prev parent reply other threads:[~2021-11-14 3:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 17:39 [PATCH Strawman] crypto: Handle PEM-encoded x.509 certificates Chuck Lever
2021-11-12 18:49 ` Eric Biggers
2021-11-13 19:12 ` Chuck Lever III
2021-11-13 23:02 ` Eric Biggers
2021-11-14 2:34 ` Chuck Lever III
2021-11-14 3:00 ` Eric Biggers [this message]
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=YZB75rDM9zoo4vXh@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=ak@tempesta-tech.com \
--cc=chuck.lever@oracle.com \
--cc=dhowells@redhat.com \
--cc=linux-crypto@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox