All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Kees Cook <kees@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
	"Theodore Y. Ts'o" <tytso@mit.edu>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	"Gustavo A . R . Silva" <gustavoars@kernel.org>,
	linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH] fscrypt: Replace 1-element array with flexible array
Date: Tue, 23 May 2023 02:50:07 +0000	[thread overview]
Message-ID: <20230523025007.GC3187780@google.com> (raw)
In-Reply-To: <F340AF2B-C611-48FE-BCB6-C4FF45005409@kernel.org>

On Mon, May 22, 2023 at 06:23:06PM -0700, Kees Cook wrote:
> On May 22, 2023 4:02:06 PM PDT, Eric Biggers <ebiggers@kernel.org> wrote:
> >On Mon, May 22, 2023 at 02:39:28PM -0700, Kees Cook wrote:
> >> In the future, we can add annotations for the flexible array member
> >> "encrypted_path" to have a size determined by the "len" member.
> >
> >That seems unlikely, as 'struct fscrypt_symlink_data' is an on-disk data
> >structure.  The "len" field does not necessarily use CPU endianness, and before
> >being validated it might be greater than the size of the allocated space.
> 
> Oh yes, good point.
> 
> >I agree that it should use a flex array (and thanks for catching this one that I
> >had forgotten about...), but the above explanation seems wrong.
> 
> Shall I spin a v2?

Yes, please go ahead.

- Eric

      reply	other threads:[~2023-05-23  2:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 21:39 [PATCH] fscrypt: Replace 1-element array with flexible array Kees Cook
2023-05-22 22:34 ` Bill Wendling
2023-05-22 23:02 ` Eric Biggers
2023-05-23  1:23   ` Kees Cook
2023-05-23  2:50     ` 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=20230523025007.GC3187780@google.com \
    --to=ebiggers@kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=kees@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@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 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.