All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: keyrings@vger.kernel.org, Denis Kenzior <denkenz@gmail.com>,
	David Howells <dhowells@redhat.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	James Morris <james.morris@microsoft.com>,
	linux-crypto@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/3] KEYS: asym_tpm: fix buffer overreads in extract_key_parameters()
Date: Tue, 8 Feb 2022 10:30:27 +0100	[thread overview]
Message-ID: <YgI4M88wvxcY41RK@iki.fi> (raw)
In-Reply-To: <YfQ9PEp9zi+xWvQk@sol.localdomain>

On Fri, Jan 28, 2022 at 11:00:12AM -0800, Eric Biggers wrote:
> On Wed, Jan 26, 2022 at 04:22:53PM +0200, Jarkko Sakkinen wrote:
> > On Wed, Jan 26, 2022 at 04:21:53PM +0200, Jarkko Sakkinen wrote:
> > > On Tue, Jan 18, 2022 at 04:59:47PM -0800, Eric Biggers wrote:
> > > > On Sat, Jan 15, 2022 at 11:40:48PM +0200, Jarkko Sakkinen wrote:
> > > > > > 
> > > > > > - Avoid integer overflows when validating size fields; 'sz + 12' and
> > > > > >   '4 + sz' overflowed if 'sz' is near U32_MAX.
> > > > > 
> > > > > So we have a struct tpm_header in include/linux/tpm.h. It would be way
> > > > > more informative to use sizeof(struct tpm_header) than number 12, even
> > > > > if the patch does not otherwise use the struct. It tells what it is, 12
> > > > > does not.
> > > > 
> > > > I don't think that would be an improvement, given that the code is using
> > > > hard-coded offsets.  If it's reading 4 bytes from cur + 8, it's much easier to
> > > > understand that it needs 12 bytes than 'sizeof(struct tpm_header)' bytes.
> > > > 
> > > > I'd certainly encourage whoever is maintaining this code to change it to use
> > > > structs instead, but that's not what this patch is meant to do.
> > > 
> > > I would consider dropping asym_tpm as it has no practical use cases
> > > existing.
> > 
> > At least I have zero motivation to maintain it as it does not meet
> > any quality standards and is based on insecure crypto algorithms.
> > I neither have participated to its review process.
> 
> Fair enough, I'll send a patch to remove it then.

It is IMHO. I mean having this advertising insecure ways to to do crypto.

Thank you.

PS. My latency is because I've been moving to a new job. It is temporary.

/Jarkko

  reply	other threads:[~2022-02-08  9:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 23:54 [PATCH 0/3] KEYS: fixes for asym_tpm keys Eric Biggers
2022-01-13 23:54 ` [PATCH 1/3] KEYS: asym_tpm: fix buffer overreads in extract_key_parameters() Eric Biggers
2022-01-15 21:40   ` Jarkko Sakkinen
2022-01-19  0:59     ` Eric Biggers
2022-01-26 14:21       ` Jarkko Sakkinen
2022-01-26 14:22         ` Jarkko Sakkinen
2022-01-28 19:00           ` Eric Biggers
2022-02-08  9:30             ` Jarkko Sakkinen [this message]
2022-01-13 23:54 ` [PATCH 2/3] KEYS: asym_tpm: fix incorrect comment Eric Biggers
2022-01-15 19:12   ` Jarkko Sakkinen
2022-01-13 23:54 ` [PATCH 3/3] KEYS: asym_tpm: rename derive_pub_key() Eric Biggers
2022-01-15 19:09   ` Jarkko Sakkinen
2022-01-14 14:54 ` [PATCH 0/3] KEYS: fixes for asym_tpm keys Denis Kenzior
2022-01-15 21:42 ` 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=YgI4M88wvxcY41RK@iki.fi \
    --to=jarkko@kernel.org \
    --cc=denkenz@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=james.morris@microsoft.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=stable@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.