Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89DB4C43381 for ; Wed, 6 Mar 2019 08:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5179C20661 for ; Wed, 6 Mar 2019 08:20:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rfvjbRIO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729150AbfCFIU4 (ORCPT ); Wed, 6 Mar 2019 03:20:56 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38931 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729145AbfCFIU4 (ORCPT ); Wed, 6 Mar 2019 03:20:56 -0500 Received: by mail-ed1-f67.google.com with SMTP id p27so9548927edc.6 for ; Wed, 06 Mar 2019 00:20:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=csL8AvNXUXdoKkL7fryVJhijPMokxIY7grU3lP7aeMs=; b=rfvjbRIO27XoEEzH2djR4SGmfkiLH5uY+637NuESNE9iEASa2IdG1G/StpJ+aYcAMx cj9vMbkAjk2/eoF8R528IGqI1Bbb4uEJrNhciwvavaYjhlBY2fQPA93BNnJVUtiTYZtU dX0mAF3pqxD6OBt+Cr1Bsd1ezHJjONtQe8vPg3r+xrIMmK4Ok1qUhL2+j1S4uGdLrBR0 efpRymF85UU2MZift1aZYVSlhNxb4j5B9jkstT02Bx721F+ATwq2v/ELH+vI+6svUzpI 9GCJGohZ0Itt42pSGMTKZLymvsBzlOHXAl133HOIQpsVNmzV2Fqa6BSGek3y8xfaua8k iZEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=csL8AvNXUXdoKkL7fryVJhijPMokxIY7grU3lP7aeMs=; b=EJI6ZNAGrNLbiWqXpVNvCBNmHNUxTecl1zrcDgnJBlJblu/586pDQj9wml+ac1MPJn 0D5VYXH0LRCLjA7YNQOgWD3zma/IX9JAB+2ctEmcvVhOCGVyYHgjjptQdu+zj1ltDxzf TxzdKP6n4XjYXqRDLrIbnsSJZeMQa3AAN/50O6MXFMDJLc5t5z9ftHpe3N9DKZZ8kA0j 0cMTuB9NoEtQxgXvXIexXL3BKb585nN7WWVJAl+q+43b/3FcPxXv6wyC6yvRzfwcgyz6 ooaIkOSgNTGHjzUuk4IoK4Hl5OGDWfXZFIGiByBGiAo6Qq4deZvsFeuW5IQFQ1SjsNLW Ns+A== X-Gm-Message-State: APjAAAXfeeMRalMlgexlETZE3ec2cbnVeGcahQ9UiDhz4tYKbwSzCqgp IddKaOzisqMhnjKslKZR+HecPSHu X-Google-Smtp-Source: APXvYqxll7nDLCNbhye2aR3w6mW0n5bpPPiSEx0yiNySCBDBk+OSZ08z6Ki/9XFR2dkaFpEA3pYYIA== X-Received: by 2002:aa7:dcc4:: with SMTP id w4mr22882248edu.64.1551860454751; Wed, 06 Mar 2019 00:20:54 -0800 (PST) Received: from brutus (brutus.defensec.nl. [2001:985:d55d::438]) by smtp.gmail.com with ESMTPSA id k8sm263802ede.65.2019.03.06.00.20.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Mar 2019 00:20:54 -0800 (PST) From: Dominick Grift To: "Sugar\, David" Cc: "selinux-refpolicy\@vger.kernel.org" Subject: Re: [PATCH] Add interface to allow relabeling of iso 9660 filesystems. References: <20190305223209.18922-1-dsugar@tresys.com> Date: Wed, 06 Mar 2019 09:20:53 +0100 In-Reply-To: <20190305223209.18922-1-dsugar@tresys.com> (David Sugar's message of "Tue, 5 Mar 2019 22:32:44 +0000") Message-ID: <87wolcxvkq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org "Sugar, David" writes: > I have a case where I'm labeling media with my own types to control > access. But that is requiring that I relabel from iso9660_t to my > own type. This interface allows that relabel. Not sure why you would want this as iso9600 is read-only any way, I suppose you want to block read access for entities that can already read iso9660. > > type=AVC msg=audit(1551621984.372:919): avc: denied { relabelfrom } for pid=9717 comm="mount" scontext=staff_u:staff_r:mymedia_sudo_t:s0-s0:c0.c1023 tcontext=system_u:object_r:iso9660_t:s0 tclass=filesystem permissive=0 > > Signed-off-by: Dave Sugar > --- > policy/modules/kernel/filesystem.if | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if > index 048b9d65..a22cb6ba 100644 > --- a/policy/modules/kernel/filesystem.if > +++ b/policy/modules/kernel/filesystem.if > @@ -2505,6 +2505,25 @@ interface(`fs_remount_iso9660_fs',` > allow $1 iso9660_t:filesystem remount; > ') > > +######################################## > +## > +## Allow changing of the label of a > +## filesystem with iso9660 type > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`fs_relabelfrom_iso9660_fs',` > + gen_require(` > + type iso9660_t; > + ') > + > + allow $1 iso9660_t:filesystem relabelfrom; > +') > + > ######################################## > ## > ## Unmount an iso9660 filesystem, which -- Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift