Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1166425

Re: [PATCH 5/7] SELinux: Handle opening of a unioned file

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/7] SELinux: Handle opening of a unioned file
Date 2015-06-16 23:40 +0200
Message-ID <pC6Km-6kX-19@gated-at.bofh.it> (permalink)
References (4 earlier) <ojb0l-837-9@gated-at.bofh.it> <ojb0l-837-17@gated-at.bofh.it> <pAzdM-1hh-9@gated-at.bofh.it> <pC2no-8iG-7@gated-at.bofh.it> <pC2Qq-GT-25@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


Stephen Smalley <sds@tycho.nsa.gov> wrote:

> Why are you talking about file_open()?

Because that's the focus of the patch 5/7 that this comment chain is in
response to.  You said that it should have a common helper with the dentry and
inode init functions.

	Also, would be good to create a common helper for use here, by
	selinux_dentry_init_security(), selinux_inode_init_security(), and
	may_create().  Already some seeming potential for inconsistencies
	there.

Okay, I missed that you'd said may_create() too.  I further assumed that you
meant that selinux_file_open_union() should use the common helper too.

> Until a process writes to the file, we just want to use the lower inode
> label, right?

No.

There are two issues:

 (1) Non-fd accesses to an overlayfs file use the security label on the
     overlay inode, not the lower inode, even before copy up because they go
     through the inode ops of the overlayfs file first.

 (2) I'm told that we want the ability to have a different label on the upper
     file to that on the lower file.  This is trivial in overlayfs since you
     always have an overlay inode off which to hang the security label, but
     tricky with unionmount since you may only have a dentry.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 5/7] SELinux: Handle opening of a unioned file Stephen Smalley <sds@tycho.nsa.gov> - 2015-06-16 19:30 +0200
  Re: [PATCH 5/7] SELinux: Handle opening of a unioned file David Howells <dhowells@redhat.com> - 2015-06-16 23:40 +0200

csiph-web