From: Kees Cook <keescook@chromium.org>
To: jeffxu@chromium.org
Cc: skhan@linuxfoundation.org, akpm@linux-foundation.org,
dmitry.torokhov@gmail.com, dverkamp@chromium.org,
hughd@google.com, jeffxu@google.com, jorgelo@chromium.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-mm@kvack.org, mnissler@chromium.org, jannh@google.com,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3] mm/memfd: add F_SEAL_EXEC
Date: Fri, 2 Dec 2022 14:45:01 -0800 [thread overview]
Message-ID: <202212021444.3433C0E5@keescook> (raw)
In-Reply-To: <20221202013404.163143-2-jeffxu@google.com>
On Fri, Dec 02, 2022 at 01:33:59AM +0000, jeffxu@chromium.org wrote:
> From: Daniel Verkamp <dverkamp@chromium.org>
>
> The new F_SEAL_EXEC flag will prevent modification of the exec bits:
> written as traditional octal mask, 0111, or as named flags, S_IXUSR |
> S_IXGRP | S_IXOTH. Any chmod(2) or similar call that attempts to modify
> any of these bits after the seal is applied will fail with errno EPERM.
>
> This will preserve the execute bits as they are at the time of sealing,
> so the memfd will become either permanently executable or permanently
> un-executable.
>
> Co-developed-by: Jeff Xu <jeffxu@chromium.org>
> Signed-off-by: Jeff Xu <jeffxu@chromium.org>
> Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Oh, one note on tag ordering here. Since you're sending it, I would
expect this to read as:
From: Daniel Verkamp <dverkamp@chromium.org>
...
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Co-developed-by: Jeff Xu <jeffxu@chromium.org>
Signed-off-by: Jeff Xu <jeffxu@chromium.org>
--
Kees Cook
next prev parent reply other threads:[~2022-12-02 22:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221202013404.163143-1-jeffxu@google.com>
[not found] ` <20221202013404.163143-6-jeffxu@google.com>
2022-12-02 10:11 ` [PATCH v3] mm/memfd: security hook for memfd_create kernel test robot
2022-12-02 12:33 ` kernel test robot
2022-12-02 22:58 ` Kees Cook
2022-12-02 23:23 ` Jeff Xu
[not found] ` <20221202013404.163143-3-jeffxu@google.com>
2022-12-02 11:32 ` [PATCH v3] mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC kernel test robot
2022-12-02 13:33 ` kernel test robot
2022-12-02 13:43 ` kernel test robot
2022-12-02 22:56 ` Kees Cook
2022-12-02 23:32 ` Jeff Xu
2022-12-02 22:41 ` [PATCH v3] mm/memfd: " Kees Cook
[not found] ` <20221202013404.163143-2-jeffxu@google.com>
2022-12-02 22:43 ` [PATCH v3] mm/memfd: add F_SEAL_EXEC Kees Cook
2022-12-02 22:45 ` Kees Cook [this message]
[not found] ` <20221202013404.163143-7-jeffxu@google.com>
2022-12-02 23:23 ` [PATCH v3] mm/memfd: Add write seals when apply SEAL_EXEC to executable memfd Daniel Verkamp
2022-12-03 2:29 ` Jeff Xu
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=202212021444.3433C0E5@keescook \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dverkamp@chromium.org \
--cc=hughd@google.com \
--cc=jannh@google.com \
--cc=jeffxu@chromium.org \
--cc=jeffxu@google.com \
--cc=jorgelo@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mnissler@chromium.org \
--cc=skhan@linuxfoundation.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