From mboxrd@z Thu Jan 1 00:00:00 1970 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=-7.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 6D697C6783B for ; Tue, 11 Dec 2018 23:00:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33DCE2084E for ; Tue, 11 Dec 2018 23:00:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="cj7QPAZ4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33DCE2084E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ieee.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbeLKXAu (ORCPT ); Tue, 11 Dec 2018 18:00:50 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:46842 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbeLKXAt (ORCPT ); Tue, 11 Dec 2018 18:00:49 -0500 Received: by mail-qt1-f195.google.com with SMTP id y20so18425482qtm.13 for ; Tue, 11 Dec 2018 15:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=+Ap0MocOTL5cp1GWPXbxOFcvs923k6Ow6t9v/6vbI9o=; b=cj7QPAZ4JJl10MuklX+Rb60mffASb2+BKSdwtiiD3CCAHQNBv6Evc4j+zItK/PXIph rkodsb5gslLP7w0db5SNUt1MM+/jOmwFo8UXlKOpiHq0PjaqhRST/dl8lknqZXKFgX8T Pbz7n1x/VvETBezzqNdX5VW1Mf1z6ZEq0V3lM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+Ap0MocOTL5cp1GWPXbxOFcvs923k6Ow6t9v/6vbI9o=; b=QbYKzInwwmB01E7I4fdlqS3nx4nT4BgT7llzmHCqW0PuWwCNyEOu2Qw+lLzmRLk3Ag 5d06C2JMyuAIW9viY7+4ZzNA8G7RrA6WRas/GML+8C0DQu7hDLf59slFHe2TVhFLuH05 pDUDVUSJ/sTC2gH1Ej/KgTTLAiLAfV9aP8GLMs7YSNL1uxSNgMtQ6xTITMjxu6Gk1e3V IfTUKAUWrdy6R8uglREhg/u34gzf3wF83DmKe+oM0S5qMtwOBVLxBBL02SaT84FXpRqx ezPlPW5Wpv2fsXJEjQM+sMxdhA3PUxHQMvvXbs1WtSvm+SZJa+KfgaAKlfFYoaLSolMR mNhA== X-Gm-Message-State: AA+aEWaK1YzXQKEisxGSdoWm8uWGGe9R93wuweFiGQWJeYUJMNtD+eZN aXIjxw3cNLdlu7nXkcWwMcitDr2aDzY= X-Google-Smtp-Source: AFSGD/VAqp841zISZzKP8JJjqP9ehgodu+CEIeuxwaqh8xbdmng7W+c5t+nGszzDbCUieOC2Z+BTww== X-Received: by 2002:a0c:c584:: with SMTP id a4mr17141550qvj.227.1544569248426; Tue, 11 Dec 2018 15:00:48 -0800 (PST) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id e4sm9978323qka.31.2018.12.11.15.00.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 15:00:48 -0800 (PST) Subject: Re: [PATCH] Allow auditctl_t to read bin_t symlinks. To: David Sugar , "selinux-refpolicy@vger.kernel.org" References: <20181207001935.16566-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: Date: Tue, 11 Dec 2018 17:53:47 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181207001935.16566-1-dsugar@tresys.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 12/6/18 7:20 PM, David Sugar wrote: > on RHEL7 insmod, rmmod, modprobe (and others?) are a symlinks > to ../bin/kmod. But policy didn't allow auditctl_t to follow > that link. > > type=AVC msg=audit(1543853530.925:141): avc: denied { read } for > pid=6937 comm="auditctl" name="insmod" dev="dm-1" ino=628383 > scontext=system_u:system_r:auditctl_t:s0 > tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 > type=AVC msg=audit(1543853530.925:143): avc: denied { read } for > pid=6937 comm="auditctl" name="rmmod" dev="dm-1" ino=628387 > scontext=system_u:system_r:auditctl_t:s0 > tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 > type=AVC msg=audit(1543853530.926:145): avc: denied { read } for > pid=6937 comm="auditctl" name="modprobe" dev="dm-1" ino=628386 > scontext=system_u:system_r:auditctl_t:s0 > tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=0 > type=AVC msg=audit(1543853797.766:60): avc: denied { read } for > pid=6942 comm="auditctl" name="insmod" dev="dm-1" ino=628383 > scontext=system_u:system_r:auditctl_t:s0 > tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file permissive=1 > > Signed-off-by: Dave Sugar > --- > policy/modules/system/logging.te | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te > index 7020a476..483084a5 100644 > --- a/policy/modules/system/logging.te > +++ b/policy/modules/system/logging.te > @@ -107,6 +107,8 @@ read_files_pattern(auditctl_t, auditd_etc_t, auditd_etc_t) > allow auditctl_t auditd_etc_t:dir list_dir_perms; > dontaudit auditctl_t auditd_etc_t:file map; > > +corecmd_search_bin(auditctl_t) > + > # Needed for adding watches > files_getattr_all_dirs(auditctl_t) > files_getattr_all_files(auditctl_t) Merged. -- Chris PeBenito