From: Eric Biggers <ebiggers@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: "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: Mon, 22 May 2023 23:02:06 +0000 [thread overview]
Message-ID: <20230522230206.GA3187780@google.com> (raw)
In-Reply-To: <20230522213924.never.119-kees@kernel.org>
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.
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.
- Eric
next prev parent reply other threads:[~2023-05-22 23:02 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 [this message]
2023-05-23 1:23 ` Kees Cook
2023-05-23 2:50 ` Eric Biggers
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=20230522230206.GA3187780@google.com \
--to=ebiggers@kernel.org \
--cc=gustavoars@kernel.org \
--cc=jaegeuk@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.