[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210201603.45E53CAF@keescook>
Date: Thu, 20 Oct 2022 16:04:22 -0700
From: Kees Cook <keescook@...omium.org>
To: Casey Schaufler <casey@...aufler-ca.com>
Cc: Mimi Zohar <zohar@...ux.ibm.com>,
John Johansen <john.johansen@...onical.com>,
Paul Moore <paul@...l-moore.com>,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
linux-security-module@...r.kernel.org,
Mickaël Salaün <mic@...ikod.net>,
KP Singh <kpsingh@...nel.org>, linux-kernel@...r.kernel.org,
linux-integrity@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH 6/9] fs: Introduce file_to_perms() helper
On Thu, Oct 20, 2022 at 10:29:08AM -0700, Casey Schaufler wrote:
> On 10/13/2022 3:36 PM, Kees Cook wrote:
> > Extract the logic used by LSM file hooks to be able to reconstruct the
> > access mode permissions from an open.
> >
> > Cc: John Johansen <john.johansen@...onical.com>
> > Cc: Paul Moore <paul@...l-moore.com>
> > Cc: James Morris <jmorris@...ei.org>
> > Cc: "Serge E. Hallyn" <serge@...lyn.com>
> > Cc: linux-security-module@...r.kernel.org
> > Signed-off-by: Kees Cook <keescook@...omium.org>
> > ---
> > include/linux/fs.h | 22 ++++++++++++++++++++++
> > security/apparmor/include/file.h | 18 ++++--------------
> > 2 files changed, 26 insertions(+), 14 deletions(-)
>
> Smack uses its own definitions for MAY_SOMETHING. Making
> AppArmor's values global is going to clash. If you want to
> do this there needs to be a grand consolidation. It could
> go in security/lsm_hooks.h. I can't see anyone other than
> Smack wanting MAY_LOCK, so I can't say the concept really
> makes much sense.
I left AppArmor's special ones in apparmor/. This only lifts the common
pre-existing global VFS MAY_* flags. (And only the low nibble's worth).
--
Kees Cook
Powered by blists - more mailing lists