[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212021444.3433C0E5@keescook>
Date: Fri, 2 Dec 2022 14:45:01 -0800
From: Kees Cook <keescook@...omium.org>
To: jeffxu@...omium.org
Cc: skhan@...uxfoundation.org, akpm@...ux-foundation.org,
dmitry.torokhov@...il.com, dverkamp@...omium.org, hughd@...gle.com,
jeffxu@...gle.com, jorgelo@...omium.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-mm@...ck.org, mnissler@...omium.org, jannh@...gle.com,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3] mm/memfd: add F_SEAL_EXEC
On Fri, Dec 02, 2022 at 01:33:59AM +0000, jeffxu@...omium.org wrote:
> From: Daniel Verkamp <dverkamp@...omium.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@...omium.org>
> Signed-off-by: Jeff Xu <jeffxu@...omium.org>
> Signed-off-by: Daniel Verkamp <dverkamp@...omium.org>
Oh, one note on tag ordering here. Since you're sending it, I would
expect this to read as:
From: Daniel Verkamp <dverkamp@...omium.org>
...
Signed-off-by: Daniel Verkamp <dverkamp@...omium.org>
Co-developed-by: Jeff Xu <jeffxu@...omium.org>
Signed-off-by: Jeff Xu <jeffxu@...omium.org>
--
Kees Cook
Powered by blists - more mailing lists