From: Olga Kornievskaia <hidden> Date: 2021-02-19 22:23:34
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
---
include/linux/lsm_hook_defs.h | 1 +
include/linux/lsm_hooks.h | 6 ++++
include/linux/security.h | 8 +++++
security/security.c | 7 +++++
security/selinux/hooks.c | 56 +++++++++++++++++++++++++++++++++++
5 files changed, 78 insertions(+)
From: Olga Kornievskaia <hidden> Date: 2021-02-19 22:23:18
From: Olga Kornievskaia <redacted>
In nfs_fill_super() passed in nfs_fs_context can never be NULL.
Signed-off-by: Olga Kornievskaia <redacted>
---
fs/nfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Olga Kornievskaia <hidden> Date: 2021-02-19 22:23:34
From: Olga Kornievskaia <redacted>
Keep track of whether or not there were LSM security context
options passed during mount (ie creation of the superblock).
Then, while deciding if the superblock can be shared for the new
mount, check if the newly passed in LSM security context options
are compatible with the existing superblock's ones by calling
security_sb_mnt_opts_compat().
Previously, with selinux enabled, NFS wasn't able to do the
following 2mounts:
mount -o vers=4.2,sec=sys,context=system_u:object_r:root_t:s0
<serverip>:/ /mnt
mount -o vers=4.2,sec=sys,context=system_u:object_r:swapfile_t:s0
<serverip>:/scratch /scratch
2nd mount would fail with "mount.nfs: an incorrect mount option was
specified" and var log messages would have:
"SElinux: mount invalid. Same superblock, different security
settings for.."
Signed-off-by: Olga Kornievskaia <redacted>
---
fs/nfs/fs_context.c | 3 +++
fs/nfs/internal.h | 1 +
fs/nfs/super.c | 4 ++++
include/linux/nfs_fs_sb.h | 1 +
4 files changed, 9 insertions(+)
From: Paul Moore <paul@paul-moore.com> Date: 2021-02-25 17:55:51
On Fri, Feb 19, 2021 at 5:25 PM Olga Kornievskaia
[off-list ref] wrote:
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
---
include/linux/lsm_hook_defs.h | 1 +
include/linux/lsm_hooks.h | 6 ++++
include/linux/security.h | 8 +++++
security/security.c | 7 +++++
security/selinux/hooks.c | 56 +++++++++++++++++++++++++++++++++++
5 files changed, 78 insertions(+)
Full disclosure: I'm a big fan of good documentation, regardless of if
it lives in comments or a separate dedicated resource. Looking at the
comment above, and the SELinux implementation of this hook below, it
appears that the comment is a bit vague; specifically the use of
"compatible". Based on the SELinux implementation, "compatible" would
seem to equal, do you envision that to be the case for every
LSM/security-model? If the answer is yes, then let's say that (and
possibly rename the hook to "sb_mnt_opts_equal"). If the answer is
no, then I think we need to do a better job explaining what
compatibility really means; put yourself in the shoes of someone
writing a LSM, what would they need to know to write an implementation
for this hook?
+ * @sb superblock being compared
+ * @mnt_opts new mount options
+ * Return 0 if options are compatible.
From: Olga Kornievskaia <hidden> Date: 2021-02-25 18:06:21
On Thu, Feb 25, 2021 at 12:53 PM Paul Moore [off-list ref] wrote:
On Fri, Feb 19, 2021 at 5:25 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
---
include/linux/lsm_hook_defs.h | 1 +
include/linux/lsm_hooks.h | 6 ++++
include/linux/security.h | 8 +++++
security/security.c | 7 +++++
security/selinux/hooks.c | 56 +++++++++++++++++++++++++++++++++++
5 files changed, 78 insertions(+)
Full disclosure: I'm a big fan of good documentation, regardless of if
it lives in comments or a separate dedicated resource. Looking at the
comment above, and the SELinux implementation of this hook below, it
appears that the comment is a bit vague; specifically the use of
"compatible". Based on the SELinux implementation, "compatible" would
seem to equal, do you envision that to be the case for every
LSM/security-model? If the answer is yes, then let's say that (and
possibly rename the hook to "sb_mnt_opts_equal"). If the answer is
no, then I think we need to do a better job explaining what
compatibility really means; put yourself in the shoes of someone
writing a LSM, what would they need to know to write an implementation
for this hook?
That's is tough to do as it is vague. All I was doing was fixing a
bug. Selinux didn't allow a new mount because it had a different
security context. What that translates to for the new hook, is up to
the LSM module whether it would need the options to be exactly the
same or if they can be slightly different but yet compatible this is
really up to the LSM.
Do you care to suggest wording to use? It is hard to find words that
somebody else is looking for but one is unable to provide them.
quoted
+ * @sb superblock being compared
+ * @mnt_opts new mount options
+ * Return 0 if options are compatible.
On Thu, Feb 25, 2021 at 12:53 PM Paul Moore [off-list ref] wrote:
quoted
On Fri, Feb 19, 2021 at 5:25 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
---
include/linux/lsm_hook_defs.h | 1 +
include/linux/lsm_hooks.h | 6 ++++
include/linux/security.h | 8 +++++
security/security.c | 7 +++++
security/selinux/hooks.c | 56 +++++++++++++++++++++++++++++++++++
5 files changed, 78 insertions(+)
Full disclosure: I'm a big fan of good documentation, regardless of if
it lives in comments or a separate dedicated resource. Looking at the
comment above, and the SELinux implementation of this hook below, it
appears that the comment is a bit vague; specifically the use of
"compatible". Based on the SELinux implementation, "compatible" would
seem to equal, do you envision that to be the case for every
LSM/security-model?
The original implementation did use sb_mnt_opts_equal(). The
change to "compatible" was my suggestion. Smack has multiple
mount options, and while I haven't actually delved into how
you would have compatible but different mount options, I
think it's possible. That's why I think that "equal" isn't
a good name for the function.
quoted
If the answer is yes, then let's say that (and
possibly rename the hook to "sb_mnt_opts_equal"). If the answer is
no, then I think we need to do a better job explaining what
compatibility really means; put yourself in the shoes of someone
writing a LSM, what would they need to know to write an implementation
for this hook?
That's is tough to do as it is vague. All I was doing was fixing a
bug. Selinux didn't allow a new mount because it had a different
security context. What that translates to for the new hook, is up to
the LSM module whether it would need the options to be exactly the
same or if they can be slightly different but yet compatible this is
really up to the LSM.
Do you care to suggest wording to use? It is hard to find words that
somebody else is looking for but one is unable to provide them.
quoted
quoted
+ * @sb superblock being compared
+ * @mnt_opts new mount options
+ * Return 0 if options are compatible.
From: Paul Moore <paul@paul-moore.com> Date: 2021-02-25 19:34:24
On Thu, Feb 25, 2021 at 1:03 PM Olga Kornievskaia
[off-list ref] wrote:
On Thu, Feb 25, 2021 at 12:53 PM Paul Moore [off-list ref] wrote:
quoted
On Fri, Feb 19, 2021 at 5:25 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
---
include/linux/lsm_hook_defs.h | 1 +
include/linux/lsm_hooks.h | 6 ++++
include/linux/security.h | 8 +++++
security/security.c | 7 +++++
security/selinux/hooks.c | 56 +++++++++++++++++++++++++++++++++++
5 files changed, 78 insertions(+)
Full disclosure: I'm a big fan of good documentation, regardless of if
it lives in comments or a separate dedicated resource. Looking at the
comment above, and the SELinux implementation of this hook below, it
appears that the comment is a bit vague; specifically the use of
"compatible". Based on the SELinux implementation, "compatible" would
seem to equal, do you envision that to be the case for every
LSM/security-model? If the answer is yes, then let's say that (and
possibly rename the hook to "sb_mnt_opts_equal"). If the answer is
no, then I think we need to do a better job explaining what
compatibility really means; put yourself in the shoes of someone
writing a LSM, what would they need to know to write an implementation
for this hook?
That's is tough to do as it is vague. All I was doing was fixing a
bug. Selinux didn't allow a new mount because it had a different
security context. What that translates to for the new hook, is up to
the LSM module whether it would need the options to be exactly the
same or if they can be slightly different but yet compatible this is
really up to the LSM.
Do you care to suggest wording to use? It is hard to find words that
somebody else is looking for but one is unable to provide them.
I didn't have anything particular in mind, I just *really* don't like
the ambiguity around "compatible". Perhaps we can take away some of
the ambiguity by providing some more explanation, how about something
like this:
"Determine if the new mount options in @mnt_opts are allowed given the
existing mounted filesystem at @sb."
... it's a pretty minor change, I'll readily admit that, but it
exchanges "compatible" for "allowed" which I *think* makes it a bit
more concrete.
--
paul moore
www.paul-moore.com
From: Olga Kornievskaia <hidden> Date: 2021-02-27 03:38:37
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
---
include/linux/lsm_hook_defs.h | 1 +
include/linux/lsm_hooks.h | 6 ++++
include/linux/security.h | 8 +++++
security/security.c | 7 +++++
security/selinux/hooks.c | 56 +++++++++++++++++++++++++++++++++++
5 files changed, 78 insertions(+)
From: Anna Schumaker <hidden> Date: 2021-03-03 03:00:51
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream. I'm happy to take it through
the NFS tree (with an acked-by) for a 5.12-rc with Olga's bugfix
patches, but if you have other thoughts or plans then let me know!
Thanks,
Anna
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
I'm happy to take it through
the NFS tree (with an acked-by) for a 5.12-rc with Olga's bugfix
patches, but if you have other thoughts or plans then let me know!
Thanks,
Anna
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-05 01:32:17
On Tue, Mar 2, 2021 at 10:53 PM Casey Schaufler [off-list ref] wrote:
On 3/2/2021 10:20 AM, Anna Schumaker wrote:
quoted
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
In the past I've pulled patches such as this (new LSM hook, with only
a SELinux implementation of the new hook) in via the selinux/next tree
after the other LSMs have ACK'd the new hook. This helps limit merge
problems with other SELinux changes and allows us (the SELinux folks)
to include it in the ongoing testing that we do during the -rcX
releases.
So Anna, if you or anyone else on the NFS side of the house want to
add your ACKs/REVIEWs/etc. please do so as I don't like merging
patches that cross subsystem boundaries without having all the
associated ACKs. Casey, James, and other LSM folks please do the
same.
--
paul moore
www.paul-moore.com
From: Anna Schumaker <hidden> Date: 2021-03-12 15:46:41
On Thu, Mar 4, 2021 at 8:34 PM Paul Moore [off-list ref] wrote:
On Tue, Mar 2, 2021 at 10:53 PM Casey Schaufler [off-list ref] wrote:
quoted
On 3/2/2021 10:20 AM, Anna Schumaker wrote:
quoted
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
In the past I've pulled patches such as this (new LSM hook, with only
a SELinux implementation of the new hook) in via the selinux/next tree
after the other LSMs have ACK'd the new hook. This helps limit merge
problems with other SELinux changes and allows us (the SELinux folks)
to include it in the ongoing testing that we do during the -rcX
releases.
So Anna, if you or anyone else on the NFS side of the house want to
add your ACKs/REVIEWs/etc. please do so as I don't like merging
patches that cross subsystem boundaries without having all the
associated ACKs. Casey, James, and other LSM folks please do the
same.
Sure:
Acked-by: Anna Schumaker <redacted>
Are you also going to take patch 3/3 that uses the new hook, or should
that go through the NFS tree? Patch 2/3 is a cleanup that can go
through the NFS tree.
Anna
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-12 21:55:48
On Fri, Mar 12, 2021 at 10:45 AM Anna Schumaker
[off-list ref] wrote:
On Thu, Mar 4, 2021 at 8:34 PM Paul Moore [off-list ref] wrote:
quoted
On Tue, Mar 2, 2021 at 10:53 PM Casey Schaufler [off-list ref] wrote:
quoted
On 3/2/2021 10:20 AM, Anna Schumaker wrote:
quoted
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
In the past I've pulled patches such as this (new LSM hook, with only
a SELinux implementation of the new hook) in via the selinux/next tree
after the other LSMs have ACK'd the new hook. This helps limit merge
problems with other SELinux changes and allows us (the SELinux folks)
to include it in the ongoing testing that we do during the -rcX
releases.
So Anna, if you or anyone else on the NFS side of the house want to
add your ACKs/REVIEWs/etc. please do so as I don't like merging
patches that cross subsystem boundaries without having all the
associated ACKs. Casey, James, and other LSM folks please do the
same.
Sure:
Acked-by: Anna Schumaker <redacted>
Are you also going to take patch 3/3 that uses the new hook, or should
that go through the NFS tree? Patch 2/3 is a cleanup that can go
through the NFS tree.
Generally when patches are posted as patchsets I would apply the whole
patchset assuming they patches were all good, however it does seem
like patch 2/3 is not strictly related to the other two? That said,
as long as your ACK applies to all three patches in the patchset I
have no problem applying all of them to the selinux/next tree once
some of the other LSM maintainers provide their ACKs (while there may
only a SELinux implementation of the hook at the moment, we need to
make sure the other LSMs are okay with the basic hook concept).
Also, did the v4 posting only include patch 1/3? I see v3 postings
for the other two patches, but the only v4 patch I see is 1/3 ... ?
--
paul moore
www.paul-moore.com
From: Olga Kornievskaia <hidden> Date: 2021-03-12 22:35:50
On Fri, Mar 12, 2021 at 4:55 PM Paul Moore [off-list ref] wrote:
On Fri, Mar 12, 2021 at 10:45 AM Anna Schumaker
[off-list ref] wrote:
quoted
On Thu, Mar 4, 2021 at 8:34 PM Paul Moore [off-list ref] wrote:
quoted
On Tue, Mar 2, 2021 at 10:53 PM Casey Schaufler [off-list ref] wrote:
quoted
On 3/2/2021 10:20 AM, Anna Schumaker wrote:
quoted
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
In the past I've pulled patches such as this (new LSM hook, with only
a SELinux implementation of the new hook) in via the selinux/next tree
after the other LSMs have ACK'd the new hook. This helps limit merge
problems with other SELinux changes and allows us (the SELinux folks)
to include it in the ongoing testing that we do during the -rcX
releases.
So Anna, if you or anyone else on the NFS side of the house want to
add your ACKs/REVIEWs/etc. please do so as I don't like merging
patches that cross subsystem boundaries without having all the
associated ACKs. Casey, James, and other LSM folks please do the
same.
Sure:
Acked-by: Anna Schumaker <redacted>
Are you also going to take patch 3/3 that uses the new hook, or should
that go through the NFS tree? Patch 2/3 is a cleanup that can go
through the NFS tree.
Generally when patches are posted as patchsets I would apply the whole
patchset assuming they patches were all good, however it does seem
like patch 2/3 is not strictly related to the other two? That said,
as long as your ACK applies to all three patches in the patchset I
have no problem applying all of them to the selinux/next tree once
some of the other LSM maintainers provide their ACKs (while there may
only a SELinux implementation of the hook at the moment, we need to
make sure the other LSMs are okay with the basic hook concept).
Also, did the v4 posting only include patch 1/3? I see v3 postings
for the other two patches, but the only v4 patch I see is 1/3 ... ?
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-15 01:44:48
On Fri, Mar 12, 2021 at 5:35 PM Olga Kornievskaia
[off-list ref] wrote:
On Fri, Mar 12, 2021 at 4:55 PM Paul Moore [off-list ref] wrote:
quoted
On Fri, Mar 12, 2021 at 10:45 AM Anna Schumaker
[off-list ref] wrote:
quoted
On Thu, Mar 4, 2021 at 8:34 PM Paul Moore [off-list ref] wrote:
quoted
On Tue, Mar 2, 2021 at 10:53 PM Casey Schaufler [off-list ref] wrote:
quoted
On 3/2/2021 10:20 AM, Anna Schumaker wrote:
quoted
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
In the past I've pulled patches such as this (new LSM hook, with only
a SELinux implementation of the new hook) in via the selinux/next tree
after the other LSMs have ACK'd the new hook. This helps limit merge
problems with other SELinux changes and allows us (the SELinux folks)
to include it in the ongoing testing that we do during the -rcX
releases.
So Anna, if you or anyone else on the NFS side of the house want to
add your ACKs/REVIEWs/etc. please do so as I don't like merging
patches that cross subsystem boundaries without having all the
associated ACKs. Casey, James, and other LSM folks please do the
same.
Sure:
Acked-by: Anna Schumaker <redacted>
Are you also going to take patch 3/3 that uses the new hook, or should
that go through the NFS tree? Patch 2/3 is a cleanup that can go
through the NFS tree.
Generally when patches are posted as patchsets I would apply the whole
patchset assuming they patches were all good, however it does seem
like patch 2/3 is not strictly related to the other two? That said,
as long as your ACK applies to all three patches in the patchset I
have no problem applying all of them to the selinux/next tree once
some of the other LSM maintainers provide their ACKs (while there may
only a SELinux implementation of the hook at the moment, we need to
make sure the other LSMs are okay with the basic hook concept).
Also, did the v4 posting only include patch 1/3? I see v3 postings
for the other two patches, but the only v4 patch I see is 1/3 ... ?
I didn't not repost patches that didn't change.
Okay, so I'm guessing that means path 2/3 and 3/3 didn't change?
While I suppose there are cases where people do not do this, it has
been my experience that if someone posts a patchset and some portion
of the patchset changes, due to feedback or other factors, the entire
patchset is reposted under the new version number. If nothing else
this helps ensure people are always looking at the latest draft of a
particular patch instead of having to dig through the list to
determine which patch is the most recent.
--
paul moore
www.paul-moore.com
From: Olga Kornievskaia <hidden> Date: 2021-03-15 15:31:44
On Sun, Mar 14, 2021 at 9:44 PM Paul Moore [off-list ref] wrote:
On Fri, Mar 12, 2021 at 5:35 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
On Fri, Mar 12, 2021 at 4:55 PM Paul Moore [off-list ref] wrote:
quoted
On Fri, Mar 12, 2021 at 10:45 AM Anna Schumaker
[off-list ref] wrote:
quoted
On Thu, Mar 4, 2021 at 8:34 PM Paul Moore [off-list ref] wrote:
quoted
On Tue, Mar 2, 2021 at 10:53 PM Casey Schaufler [off-list ref] wrote:
quoted
On 3/2/2021 10:20 AM, Anna Schumaker wrote:
quoted
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
In the past I've pulled patches such as this (new LSM hook, with only
a SELinux implementation of the new hook) in via the selinux/next tree
after the other LSMs have ACK'd the new hook. This helps limit merge
problems with other SELinux changes and allows us (the SELinux folks)
to include it in the ongoing testing that we do during the -rcX
releases.
So Anna, if you or anyone else on the NFS side of the house want to
add your ACKs/REVIEWs/etc. please do so as I don't like merging
patches that cross subsystem boundaries without having all the
associated ACKs. Casey, James, and other LSM folks please do the
same.
Sure:
Acked-by: Anna Schumaker <redacted>
Are you also going to take patch 3/3 that uses the new hook, or should
that go through the NFS tree? Patch 2/3 is a cleanup that can go
through the NFS tree.
Generally when patches are posted as patchsets I would apply the whole
patchset assuming they patches were all good, however it does seem
like patch 2/3 is not strictly related to the other two? That said,
as long as your ACK applies to all three patches in the patchset I
have no problem applying all of them to the selinux/next tree once
some of the other LSM maintainers provide their ACKs (while there may
only a SELinux implementation of the hook at the moment, we need to
make sure the other LSMs are okay with the basic hook concept).
Also, did the v4 posting only include patch 1/3? I see v3 postings
for the other two patches, but the only v4 patch I see is 1/3 ... ?
I didn't not repost patches that didn't change.
Okay, so I'm guessing that means path 2/3 and 3/3 didn't change?
While I suppose there are cases where people do not do this, it has
been my experience that if someone posts a patchset and some portion
of the patchset changes, due to feedback or other factors, the entire
patchset is reposted under the new version number. If nothing else
this helps ensure people are always looking at the latest draft of a
particular patch instead of having to dig through the list to
determine which patch is the most recent.
Correct, patches 2&3 didn't change and selinux patch generated several
iterations. Would you like me to repost a series? I'm not sure what
I'm supposed to do at this point.
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-15 16:17:06
On Mon, Mar 15, 2021 at 11:31 AM Olga Kornievskaia
[off-list ref] wrote:
On Sun, Mar 14, 2021 at 9:44 PM Paul Moore [off-list ref] wrote:
quoted
On Fri, Mar 12, 2021 at 5:35 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
On Fri, Mar 12, 2021 at 4:55 PM Paul Moore [off-list ref] wrote:
quoted
On Fri, Mar 12, 2021 at 10:45 AM Anna Schumaker
[off-list ref] wrote:
quoted
On Thu, Mar 4, 2021 at 8:34 PM Paul Moore [off-list ref] wrote:
quoted
On Tue, Mar 2, 2021 at 10:53 PM Casey Schaufler [off-list ref] wrote:
quoted
On 3/2/2021 10:20 AM, Anna Schumaker wrote:
quoted
Hi Casey,
On Fri, Feb 26, 2021 at 10:40 PM Olga Kornievskaia
[off-list ref] wrote:
quoted
From: Olga Kornievskaia <redacted>
Add a new hook that takes an existing super block and a new mount
with new options and determines if new options confict with an
existing mount or not.
A filesystem can use this new hook to determine if it can share
the an existing superblock with a new superblock for the new mount.
Signed-off-by: Olga Kornievskaia <redacted>
Do you have any other thoughts on this patch? I'm also wondering how
you want to handle sending it upstream.
James Morris is the maintainer for the security sub-system,
so you'll want to send this through him. He will want you to
have an ACK from Paul Moore, who is the SELinux maintainer.
In the past I've pulled patches such as this (new LSM hook, with only
a SELinux implementation of the new hook) in via the selinux/next tree
after the other LSMs have ACK'd the new hook. This helps limit merge
problems with other SELinux changes and allows us (the SELinux folks)
to include it in the ongoing testing that we do during the -rcX
releases.
So Anna, if you or anyone else on the NFS side of the house want to
add your ACKs/REVIEWs/etc. please do so as I don't like merging
patches that cross subsystem boundaries without having all the
associated ACKs. Casey, James, and other LSM folks please do the
same.
Sure:
Acked-by: Anna Schumaker <redacted>
Are you also going to take patch 3/3 that uses the new hook, or should
that go through the NFS tree? Patch 2/3 is a cleanup that can go
through the NFS tree.
Generally when patches are posted as patchsets I would apply the whole
patchset assuming they patches were all good, however it does seem
like patch 2/3 is not strictly related to the other two? That said,
as long as your ACK applies to all three patches in the patchset I
have no problem applying all of them to the selinux/next tree once
some of the other LSM maintainers provide their ACKs (while there may
only a SELinux implementation of the hook at the moment, we need to
make sure the other LSMs are okay with the basic hook concept).
Also, did the v4 posting only include patch 1/3? I see v3 postings
for the other two patches, but the only v4 patch I see is 1/3 ... ?
I didn't not repost patches that didn't change.
Okay, so I'm guessing that means path 2/3 and 3/3 didn't change?
While I suppose there are cases where people do not do this, it has
been my experience that if someone posts a patchset and some portion
of the patchset changes, due to feedback or other factors, the entire
patchset is reposted under the new version number. If nothing else
this helps ensure people are always looking at the latest draft of a
particular patch instead of having to dig through the list to
determine which patch is the most recent.
Correct, patches 2&3 didn't change and selinux patch generated several
iterations. Would you like me to repost a series? I'm not sure what
I'm supposed to do at this point.
As long as we are clear that the latest draft of patch 1/3 is to be
taken from the v4 patch{set} and patches 2/3 and 3/3 are to be taken
from v3 of the patchset I don't think you need to do anything further.
The important bit is for the other LSM folks to ACK the new hook; if I
don't see anything from them, either positive or negative, I'll merge
it towards the end of this week or early next.
--
paul moore
www.paul-moore.com
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-18 19:13:52
On Mon, Mar 15, 2021 at 12:15 PM Paul Moore [off-list ref] wrote:
As long as we are clear that the latest draft of patch 1/3 is to be
taken from the v4 patch{set} and patches 2/3 and 3/3 are to be taken
from v3 of the patchset I don't think you need to do anything further.
The important bit is for the other LSM folks to ACK the new hook; if I
don't see anything from them, either positive or negative, I'll merge
it towards the end of this week or early next.
LSM folks, this is a reminder that if you want to object you've got
until Monday morning to do so :)
--
paul moore
www.paul-moore.com
On Mon, Mar 15, 2021 at 12:15 PM Paul Moore [off-list ref] wrote:
quoted
As long as we are clear that the latest draft of patch 1/3 is to be
taken from the v4 patch{set} and patches 2/3 and 3/3 are to be taken
from v3 of the patchset I don't think you need to do anything further.
The important bit is for the other LSM folks to ACK the new hook; if I
don't see anything from them, either positive or negative, I'll merge
it towards the end of this week or early next.
LSM folks, this is a reminder that if you want to object you've got
until Monday morning to do so :)
No objections on my part. My comments have been addressed.
From: James Morris <jmorris@namei.org> Date: 2021-03-18 22:52:39
On Thu, 18 Mar 2021, Paul Moore wrote:
On Mon, Mar 15, 2021 at 12:15 PM Paul Moore [off-list ref] wrote:
quoted
As long as we are clear that the latest draft of patch 1/3 is to be
taken from the v4 patch{set} and patches 2/3 and 3/3 are to be taken
from v3 of the patchset I don't think you need to do anything further.
The important bit is for the other LSM folks to ACK the new hook; if I
don't see anything from them, either positive or negative, I'll merge
it towards the end of this week or early next.
LSM folks, this is a reminder that if you want to object you've got
until Monday morning to do so :)
I'm unclear on whether a new v5 patchset was being posted -- I assume not?
--
James Morris
[off-list ref]
From: Olga Kornievskaia <hidden> Date: 2021-03-18 23:00:11
On Thu, Mar 18, 2021 at 6:51 PM James Morris [off-list ref] wrote:
On Thu, 18 Mar 2021, Paul Moore wrote:
quoted
On Mon, Mar 15, 2021 at 12:15 PM Paul Moore [off-list ref] wrote:
quoted
As long as we are clear that the latest draft of patch 1/3 is to be
taken from the v4 patch{set} and patches 2/3 and 3/3 are to be taken
from v3 of the patchset I don't think you need to do anything further.
The important bit is for the other LSM folks to ACK the new hook; if I
don't see anything from them, either positive or negative, I'll merge
it towards the end of this week or early next.
LSM folks, this is a reminder that if you want to object you've got
until Monday morning to do so :)
I'm unclear on whether a new v5 patchset was being posted -- I assume not?
v4 addressed all the existing concerns/comments that were made. no new
version is planned unless somebody else has any more comments.
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-22 18:57:19
On Thu, Mar 18, 2021 at 3:12 PM Paul Moore [off-list ref] wrote:
On Mon, Mar 15, 2021 at 12:15 PM Paul Moore [off-list ref] wrote:
quoted
As long as we are clear that the latest draft of patch 1/3 is to be
taken from the v4 patch{set} and patches 2/3 and 3/3 are to be taken
from v3 of the patchset I don't think you need to do anything further.
The important bit is for the other LSM folks to ACK the new hook; if I
don't see anything from them, either positive or negative, I'll merge
it towards the end of this week or early next.
LSM folks, this is a reminder that if you want to object you've got
until Monday morning to do so :)
Time is up, I just merged it into selinux/next ;)
Thanks everyone!
--
paul moore
www.paul-moore.com
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-22 19:01:03
On Fri, Feb 19, 2021 at 5:24 PM Olga Kornievskaia
[off-list ref] wrote:
From: Olga Kornievskaia <redacted>
In nfs_fill_super() passed in nfs_fs_context can never be NULL.
Signed-off-by: Olga Kornievskaia <redacted>
---
fs/nfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Merged into selinux/next, thanks.
--
paul moore
www.paul-moore.com
From: Paul Moore <paul@paul-moore.com> Date: 2021-03-22 19:05:23
On Fri, Feb 19, 2021 at 5:25 PM Olga Kornievskaia
[off-list ref] wrote:
From: Olga Kornievskaia <redacted>
Keep track of whether or not there were LSM security context
options passed during mount (ie creation of the superblock).
Then, while deciding if the superblock can be shared for the new
mount, check if the newly passed in LSM security context options
are compatible with the existing superblock's ones by calling
security_sb_mnt_opts_compat().
Previously, with selinux enabled, NFS wasn't able to do the
following 2mounts:
mount -o vers=4.2,sec=sys,context=system_u:object_r:root_t:s0
<serverip>:/ /mnt
mount -o vers=4.2,sec=sys,context=system_u:object_r:swapfile_t:s0
<serverip>:/scratch /scratch
2nd mount would fail with "mount.nfs: an incorrect mount option was
specified" and var log messages would have:
"SElinux: mount invalid. Same superblock, different security
settings for.."
Signed-off-by: Olga Kornievskaia <redacted>
---
fs/nfs/fs_context.c | 3 +++
fs/nfs/internal.h | 1 +
fs/nfs/super.c | 4 ++++
include/linux/nfs_fs_sb.h | 1 +
4 files changed, 9 insertions(+)
Merged into selinux/next, thanks.
--
paul moore
www.paul-moore.com