From: Theodore Ts'o <tytso@mit.edu>
To: Eric Biggers <ebiggers@google.com>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-crypto@vger.kernel.org, jaegeuk@kernel.org, richard@nod.at,
luto@kernel.org
Subject: Re: [PATCH 2/2] fscrypto: don't use on-stack buffer for key derivation
Date: Tue, 15 Nov 2016 11:47:04 -0500 [thread overview]
Message-ID: <20161115164704.5tzvm2g2x2fyetyu@thunk.org> (raw)
In-Reply-To: <1478210582-86338-2-git-send-email-ebiggers@google.com>
On Thu, Nov 03, 2016 at 03:03:02PM -0700, Eric Biggers wrote:
> With the new (in 4.9) option to use a virtually-mapped stack
> (CONFIG_VMAP_STACK), stack buffers cannot be used as input/output for
> the scatterlist crypto API because they may not be directly mappable to
> struct page. get_crypt_info() was using a stack buffer to hold the
> output from the encryption operation used to derive the per-file key.
> Fix it by using a heap buffer.
>
> This bug could most easily be observed in a CONFIG_DEBUG_SG kernel
> because this allowed the BUG in sg_set_buf() to be triggered.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is on the fscrypt and dev branches on ext4.git.
- Ted
next prev parent reply other threads:[~2016-11-15 16:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 22:03 [PATCH 1/2] fscrypto: don't use on-stack buffer for filename encryption Eric Biggers
2016-11-03 22:03 ` [PATCH 2/2] fscrypto: don't use on-stack buffer for key derivation Eric Biggers
2016-11-07 13:22 ` Richard Weinberger
2016-11-15 16:47 ` Theodore Ts'o [this message]
2016-11-15 18:53 ` Eric Biggers
2016-11-05 15:13 ` [PATCH 1/2] fscrypto: don't use on-stack buffer for filename encryption Kent Overstreet
2016-11-07 5:00 ` Andy Lutomirski
2016-11-07 15:44 ` Christoph Hellwig
2016-11-07 13:15 ` Richard Weinberger
2016-11-15 16:46 ` Theodore Ts'o
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=20161115164704.5tzvm2g2x2fyetyu@thunk.org \
--to=tytso@mit.edu \
--cc=ebiggers@google.com \
--cc=jaegeuk@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=richard@nod.at \
/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;
as well as URLs for NNTP newsgroup(s).