mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephan Mueller <smueller@chronox.de>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: crypto: zeroization of sensitive data in af_alg
Date: Mon, 10 Nov 2014 22:05:18 +0800	[thread overview]
Message-ID: <20141110140518.GD8578@gondor.apana.org.au> (raw)
In-Reply-To: <1979092.odOtqL46qU@tachyon.chronox.de>

On Sun, Nov 09, 2014 at 11:33:52PM +0100, Stephan Mueller wrote:
> 
> while working on the AF_ALG interface, I saw no active zeroizations of memory 
> that may hold sensitive data that is maintained outside the kernel crypto API 
> cipher handles. I think the following memory segments fall under that 
> category:

Are you talking about temporary data that we generate as part of
the processing? If so they should be zeroed by the entity that
generates them.
 
> However, I am failing to find the right spot to add a zeroization for the 
> latter one, i.e. the code that handles the pages send in by the user or the 
> pages that are returned by the crypto API. Initially I thought 
> skcipher_pull_sgl is a good spot for the symmetric ciphers as it evicts the 
> used pages out of the scope of the kernel crypto API. I added a 
> clear_page(sg_page(sg+1)) as well as memset(sg_page(sg+1), 0, plen) right 
> before the put_page call. All that I got in return was a BUG() from the memory 
> management layer.

I don't think I understand what exactly you're trying to zero.
Can you give an example?

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2014-11-10 14:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 22:33 Stephan Mueller
2014-11-10 14:05 ` Herbert Xu [this message]
2014-11-11  2:06   ` Stephan Mueller
2014-11-11  2:53     ` Herbert Xu
2014-11-11  2:55 ` Sandy Harris
2014-11-11  4:16   ` Stephan Mueller
2014-11-11  4:19     ` Herbert Xu
2014-11-11  9:19     ` Daniel Borkmann

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=20141110140518.GD8578@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smueller@chronox.de \
    /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

all inboxes | Powered by JetHome®