linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Paul Crowley <paulcrowley@google.com>,
	tytso@mit.edu, jaegeuk@kernel.org, corbet@lwn.net,
	linux-fscrypt@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.10 021/101] fscrypt: allow 256-bit master keys with AES-256-XTS
Date: Mon, 8 Nov 2021 17:48:40 -0800	[thread overview]
Message-ID: <YYnTeBCwn6fd/kVU@gmail.com> (raw)
In-Reply-To: <20211108174832.1189312-21-sashal@kernel.org>

On Mon, Nov 08, 2021 at 12:47:11PM -0500, Sasha Levin wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> [ Upstream commit 7f595d6a6cdc336834552069a2e0a4f6d4756ddf ]
> 
> fscrypt currently requires a 512-bit master key when AES-256-XTS is
> used, since AES-256-XTS keys are 512-bit and fscrypt requires that the
> master key be at least as long any key that will be derived from it.
> 
> However, this is overly strict because AES-256-XTS doesn't actually have
> a 512-bit security strength, but rather 256-bit.  The fact that XTS
> takes twice the expected key size is a quirk of the XTS mode.  It is
> sufficient to use 256 bits of entropy for AES-256-XTS, provided that it
> is first properly expanded into a 512-bit key, which HKDF-SHA512 does.
> 
> Therefore, relax the check of the master key size to use the security
> strength of the derived key rather than the size of the derived key
> (except for v1 encryption policies, which don't use HKDF).
> 
> Besides making things more flexible for userspace, this is needed in
> order for the use of a KDF which only takes a 256-bit key to be
> introduced into the fscrypt key hierarchy.  This will happen with
> hardware-wrapped keys support, as all known hardware which supports that
> feature uses an SP800-108 KDF using AES-256-CMAC, so the wrapped keys
> are wrapped 256-bit AES keys.  Moreover, there is interest in fscrypt
> supporting the same type of AES-256-CMAC based KDF in software as an
> alternative to HKDF-SHA512.  There is no security problem with such
> features, so fix the key length check to work properly with them.
> 
> Reviewed-by: Paul Crowley <paulcrowley@google.com>
> Link: https://lore.kernel.org/r/20210921030303.5598-1-ebiggers@kernel.org
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

I don't expect any problem with backporting this, but I don't see how this
follows the stable kernel rules (Documentation/process/stable-kernel-rules.rst).
I don't see what distinguishes this patch from ones that don't get picked up by
AUTOSEL; it seems pretty arbitrary to me.

- Eric

  reply	other threads:[~2021-11-09  1:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211108174832.1189312-1-sashal@kernel.org>
2021-11-08 17:47 ` [PATCH AUTOSEL 5.10 021/101] fscrypt: allow 256-bit master keys with AES-256-XTS Sasha Levin
2021-11-09  1:48   ` Eric Biggers [this message]
2021-11-14 14:16     ` Sasha Levin

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=YYnTeBCwn6fd/kVU@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jaegeuk@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulcrowley@google.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).