From: Kees Cook <keescook@chromium.org>
To: raven@themaw.net, arnd@kernel.org
Cc: Kees Cook <keescook@chromium.org>,
stable@vger.kernel.org, autofs@vger.kernel.org,
linux-kernel@vger.kernel.org, corbet@lwn.net,
linux-doc@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] autofs: use flexible array in ioctl structure
Date: Tue, 23 May 2023 10:06:10 -0700 [thread overview]
Message-ID: <168486156843.2168554.9330529184813281577.b4-ty@chromium.org> (raw)
In-Reply-To: <20230523081944.581710-1-arnd@kernel.org>
On Tue, 23 May 2023 10:19:35 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") introduced a warning
> for the autofs_dev_ioctl structure:
>
> In function 'check_name',
> inlined from 'validate_dev_ioctl' at fs/autofs/dev-ioctl.c:131:9,
> inlined from '_autofs_dev_ioctl' at fs/autofs/dev-ioctl.c:624:8:
> fs/autofs/dev-ioctl.c:33:14: error: 'strchr' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
> 33 | if (!strchr(name, '/'))
> | ^~~~~~~~~~~~~~~~~
> In file included from include/linux/auto_dev-ioctl.h:10,
> from fs/autofs/autofs_i.h:10,
> from fs/autofs/dev-ioctl.c:14:
> include/uapi/linux/auto_dev-ioctl.h: In function '_autofs_dev_ioctl':
> include/uapi/linux/auto_dev-ioctl.h:112:14: note: source object 'path' of size 0
> 112 | char path[0];
> | ^~~~
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] autofs: use flexible array in ioctl structure
https://git.kernel.org/kees/c/e6d6886d469f
--
Kees Cook
prev parent reply other threads:[~2023-05-23 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 8:19 [PATCH] autofs: use flexible array in ioctl structure Arnd Bergmann
2023-05-23 17:06 ` Kees Cook [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=168486156843.2168554.9330529184813281577.b4-ty@chromium.org \
--to=keescook@chromium.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=autofs@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raven@themaw.net \
--cc=stable@vger.kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).