linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Serge Hallyn <serge@hallyn.com>,
	selinux@vger.kernel.org, linux-security-module@vger.kernel.org,
	Ondrej Mosnacek <omosnace@redhat.com>,
	Felix Fu <fuzhen5@huawei.com>,
	Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [RFC PATCH] lsm: fixup the inode xattr capability handling
Date: Sat, 4 May 2024 15:38:20 -0500	[thread overview]
Message-ID: <20240504203820.GA1488570@mail.hallyn.com> (raw)
In-Reply-To: <18f45490f18.28a4.85c95baa4474aabc7814e68940a78392@paul-moore.com>

On Sat, May 04, 2024 at 04:26:24PM -0400, Paul Moore wrote:
> On May 4, 2024 1:04:57 PM Serge Hallyn <serge@hallyn.com> wrote:
> > Hm, so if it should happen that lsm 2 returns 0 (allow) but lsm 3
> > has skipcap return 3, and lsm 3 would have returned
> > 1 to deny the remove, we will get an unexpected result.  It feels like
> > we need a stronger tie between the lsm which allowed and the one
> > saying skip the capability check.
> 
> That's not an unexpected result, that is a valid outcome in the world of LSM
> stacking. The skipcap check only guarantees that the capability check will
> be skipped if an LSM returns a non-zero value.  The vast majority (all?) of
> the hooks operate as you describe: a LSM towards the back of the list can
> reject an operation that was previous LSM has allowed.  This isn't limited
> to LSMs either, there are plenty of reasons, e.g. transient failures, which
> could cause an operation to fail after being authorized by a particular LSM.
> 
> A particular LSM can only authorize a requested operation; a successful
> return value from a LSM hook implementation can not guarantee a successful
> operation result.

Ok, thanks.

-serge

  reply	other threads:[~2024-05-04 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03  0:58 [RFC PATCH] lsm: fixup the inode xattr capability handling Paul Moore
2024-05-03 15:26 ` Casey Schaufler
2024-05-03 15:36   ` Paul Moore
2024-05-03 15:51     ` Casey Schaufler
2024-05-03 16:26       ` Paul Moore
2024-05-03 16:41         ` Casey Schaufler
2024-05-06 20:51         ` Paul Moore
2024-05-07 19:17           ` Paul Moore
2024-06-03 22:32             ` Paul Moore
2024-05-04 17:04 ` Serge Hallyn
2024-05-04 20:26   ` Paul Moore
2024-05-04 20:38     ` Serge E. Hallyn [this message]
2024-07-05 20:28 ` KP Singh
2024-07-06  4:31   ` Paul Moore

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=20240504203820.GA1488570@mail.hallyn.com \
    --to=serge@hallyn.com \
    --cc=casey@schaufler-ca.com \
    --cc=fuzhen5@huawei.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=selinux@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 NNTP newsgroup(s).