Message ID | 20200401213903.182112-1-dancol@google.com (mailing list archive) |
---|---|
Headers | show |
Series | SELinux support for anonymous inodes and UFFD | expand |
On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: > > Changes from the fourth version of the patch: Is there anything else that needs to be done before merging this patch series?
On Mon, 13 Apr 2020, Daniel Colascione wrote: > On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: > > > > Changes from the fourth version of the patch: > > > Is there anything else that needs to be done before merging this patch series? The vfs changes need review and signoff from the vfs folk, the SELinux changes by either Paul or Stephen, and we also need signoff on the LSM hooks from other major LSM authors (Casey and John, at a minimum).
On 4/22/2020 9:55 AM, James Morris wrote: > On Mon, 13 Apr 2020, Daniel Colascione wrote: > >> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: >>> Changes from the fourth version of the patch: >> >> Is there anything else that needs to be done before merging this patch series? > The vfs changes need review and signoff from the vfs folk, the SELinux > changes by either Paul or Stephen, and we also need signoff on the LSM > hooks from other major LSM authors (Casey and John, at a minimum). I haven't had the opportunity to test this relative to Smack. It's unclear whether the change would impact security modules that don't provide hooks for it. I will bump my priority on this, but it's still going to be a bit before I can get to it.
On 4/22/2020 10:12 AM, Casey Schaufler wrote: > On 4/22/2020 9:55 AM, James Morris wrote: >> On Mon, 13 Apr 2020, Daniel Colascione wrote: >> >>> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: >>>> Changes from the fourth version of the patch: >>> Is there anything else that needs to be done before merging this patch series? Do you have a test case that exercises this feature?
On 4/23/2020 3:24 PM, Casey Schaufler wrote: > On 4/22/2020 10:12 AM, Casey Schaufler wrote: >> On 4/22/2020 9:55 AM, James Morris wrote: >>> On Mon, 13 Apr 2020, Daniel Colascione wrote: >>> >>>> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: >>>>> Changes from the fourth version of the patch: >>>> Is there anything else that needs to be done before merging this patch series? > Do you have a test case that exercises this feature? I haven't heard anything back. What would cause this code to be executed?
On Mon, Apr 27, 2020 at 12:19 PM Casey Schaufler <casey@schaufler-ca.com> wrote: > > On 4/23/2020 3:24 PM, Casey Schaufler wrote: > > On 4/22/2020 10:12 AM, Casey Schaufler wrote: > >> On 4/22/2020 9:55 AM, James Morris wrote: > >>> On Mon, 13 Apr 2020, Daniel Colascione wrote: > >>> > >>>> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: > >>>>> Changes from the fourth version of the patch: > >>>> Is there anything else that needs to be done before merging this patch series? > > Do you have a test case that exercises this feature? > > I haven't heard anything back. What would cause this code to be executed? See https://lore.kernel.org/selinux/513f6230-1fb3-dbb5-5f75-53cd02b91b28@tycho.nsa.gov/ for example.
On 4/27/2020 9:48 AM, Stephen Smalley wrote: > On Mon, Apr 27, 2020 at 12:19 PM Casey Schaufler <casey@schaufler-ca.com> wrote: >> On 4/23/2020 3:24 PM, Casey Schaufler wrote: >>> On 4/22/2020 10:12 AM, Casey Schaufler wrote: >>>> On 4/22/2020 9:55 AM, James Morris wrote: >>>>> On Mon, 13 Apr 2020, Daniel Colascione wrote: >>>>> >>>>>> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: >>>>>>> Changes from the fourth version of the patch: >>>>>> Is there anything else that needs to be done before merging this patch series? >>> Do you have a test case that exercises this feature? >> I haven't heard anything back. What would cause this code to be executed? > See https://lore.kernel.org/selinux/513f6230-1fb3-dbb5-5f75-53cd02b91b28@tycho.nsa.gov/ > for example. Great. Thanks, that's what I needed. I'll Ack the patch set.
On 4/22/2020 9:55 AM, James Morris wrote: > On Mon, 13 Apr 2020, Daniel Colascione wrote: > >> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: >>> Changes from the fourth version of the patch: >> >> Is there anything else that needs to be done before merging this patch series? > The vfs changes need review and signoff from the vfs folk, the SELinux > changes by either Paul or Stephen, and we also need signoff on the LSM > hooks from other major LSM authors (Casey and John, at a minimum). You can add my Acked-by: Casey Schaufler <casey@schaufler-ca.com> for this patchset.
On Mon, Apr 27, 2020 at 1:17 PM Casey Schaufler <casey@schaufler-ca.com> wrote: > > On 4/22/2020 9:55 AM, James Morris wrote: > > On Mon, 13 Apr 2020, Daniel Colascione wrote: > > > >> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: > >>> Changes from the fourth version of the patch: > >> > >> Is there anything else that needs to be done before merging this patch series? > > The vfs changes need review and signoff from the vfs folk, the SELinux > > changes by either Paul or Stephen, and we also need signoff on the LSM > > hooks from other major LSM authors (Casey and John, at a minimum). > > You can add my > > Acked-by: Casey Schaufler <casey@schaufler-ca.com> > > for this patchset. This version of the series addresses all of my comments, so you can add my Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com> I don't know though how to get a response from the vfs folks; the series has been posted repeatedly without any response by them.
On Mon, Apr 27, 2020 at 12:48 PM Stephen Smalley <stephen.smalley.work@gmail.com> wrote: > > On Mon, Apr 27, 2020 at 12:19 PM Casey Schaufler <casey@schaufler-ca.com> wrote: > > > > On 4/23/2020 3:24 PM, Casey Schaufler wrote: > > > On 4/22/2020 10:12 AM, Casey Schaufler wrote: > > >> On 4/22/2020 9:55 AM, James Morris wrote: > > >>> On Mon, 13 Apr 2020, Daniel Colascione wrote: > > >>> > > >>>> On Wed, Apr 1, 2020 at 2:39 PM Daniel Colascione <dancol@google.com> wrote: > > >>>>> Changes from the fourth version of the patch: > > >>>> Is there anything else that needs to be done before merging this patch series? > > > Do you have a test case that exercises this feature? > > > > I haven't heard anything back. What would cause this code to be executed? > > See https://lore.kernel.org/selinux/513f6230-1fb3-dbb5-5f75-53cd02b91b28@tycho.nsa.gov/ > for example. NB The example cited above needs to be tweaked for changes in the logic from the original RFC patch on which the example was based. In particular, the userfaultfd CIL policy needs to be updated to define and use the new anon_inode class and to allow create permission as follows. $ cat userfaultfd.cil (class anon_inode ()) (classcommon anon_inode file) (classorder (unordered anon_inode)) (type uffd_t) ; Label the UFFD with uffd_t; this can be specialized per domain (typetransition unconfined_t unconfined_t anon_inode "[userfaultfd]" uffd_t) (allow unconfined_t uffd_t (anon_inode (create))) ; Permit read() and ioctl() on the UFFD. ; Comment out if you want to test read or basic ioctl enforcement. (allow unconfined_t uffd_t (anon_inode (read))) (allow unconfined_t uffd_t (anon_inode (ioctl))) ; Uncomment one of the allowx lines below to test ioctl whitelisting. ; Currently the 1st one is uncommented; comment that out if trying another. ; None (allowx unconfined_t uffd_t (ioctl anon_inode ((0x00)))) ; UFFDIO_API ;(allowx unconfined_t uffd_t (ioctl anon_inode ((0xaa3f))))
On Wed, 1 Apr 2020, Daniel Colascione wrote: > Daniel Colascione (3): > Add a new LSM-supporting anonymous inode interface > Teach SELinux about anonymous inodes > Wire UFFD up to SELinux > > fs/anon_inodes.c | 191 ++++++++++++++++++++++------ > fs/userfaultfd.c | 30 ++++- > include/linux/anon_inodes.h | 13 ++ > include/linux/lsm_hooks.h | 11 ++ > include/linux/security.h | 3 + > security/security.c | 9 ++ > security/selinux/hooks.c | 53 ++++++++ > security/selinux/include/classmap.h | 2 + > 8 files changed, 267 insertions(+), 45 deletions(-) Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git secure_uffd_v5.9 and next-testing. This will provide test coverage in linux-next, as we aim to get this upstream for v5.9. I had to make some minor fixups, please review.
On Wed, Jun 3, 2020 at 11:59 PM James Morris <jmorris@namei.org> wrote: > > On Wed, 1 Apr 2020, Daniel Colascione wrote: > > > Daniel Colascione (3): > > Add a new LSM-supporting anonymous inode interface > > Teach SELinux about anonymous inodes > > Wire UFFD up to SELinux > > > > fs/anon_inodes.c | 191 ++++++++++++++++++++++------ > > fs/userfaultfd.c | 30 ++++- > > include/linux/anon_inodes.h | 13 ++ > > include/linux/lsm_hooks.h | 11 ++ > > include/linux/security.h | 3 + > > security/security.c | 9 ++ > > security/selinux/hooks.c | 53 ++++++++ > > security/selinux/include/classmap.h | 2 + > > 8 files changed, 267 insertions(+), 45 deletions(-) > > Applied to > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git secure_uffd_v5.9 > and next-testing. > > This will provide test coverage in linux-next, as we aim to get this > upstream for v5.9. > > I had to make some minor fixups, please review. LGTM and my userfaultfd test case worked.
Adding a colleague from the Android kernel team. On Thu, Jun 4, 2020 at 11:52 AM Stephen Smalley <stephen.smalley.work@gmail.com> wrote: > > On Wed, Jun 3, 2020 at 11:59 PM James Morris <jmorris@namei.org> wrote: > > > > On Wed, 1 Apr 2020, Daniel Colascione wrote: > > > > > Daniel Colascione (3): > > > Add a new LSM-supporting anonymous inode interface > > > Teach SELinux about anonymous inodes > > > Wire UFFD up to SELinux > > > > > > fs/anon_inodes.c | 191 ++++++++++++++++++++++------ > > > fs/userfaultfd.c | 30 ++++- > > > include/linux/anon_inodes.h | 13 ++ > > > include/linux/lsm_hooks.h | 11 ++ > > > include/linux/security.h | 3 + > > > security/security.c | 9 ++ > > > security/selinux/hooks.c | 53 ++++++++ > > > security/selinux/include/classmap.h | 2 + > > > 8 files changed, 267 insertions(+), 45 deletions(-) > > > > Applied to > > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git secure_uffd_v5.9 > > and next-testing. > > > > This will provide test coverage in linux-next, as we aim to get this > > upstream for v5.9. > > > > I had to make some minor fixups, please review. > > LGTM and my userfaultfd test case worked.