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 9265CC67839 for ; Tue, 11 Dec 2018 23:00:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 586E52084E for ; Tue, 11 Dec 2018 23:00:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="ChNHbEdl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 586E52084E 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 S1726283AbeLKXAx (ORCPT ); Tue, 11 Dec 2018 18:00:53 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:38392 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbeLKXAx (ORCPT ); Tue, 11 Dec 2018 18:00:53 -0500 Received: by mail-qt1-f194.google.com with SMTP id p17so18480103qtl.5 for ; Tue, 11 Dec 2018 15:00:52 -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=UZvO0ETZeIaCPiWWZZjOIXku/FWhyR4uofwUXTEB9a4=; b=ChNHbEdlVyxkCZbIu29T/Lg7rVDi4PbTm+VJ2uYFhG1O/oDXvszqk37BW1eglucqzq MvizEE85SOQikhuZ8zczRKUGmO8CXxpC4Nl8hcMXkrFkS2MrUs4ozcQzVGWZZIeSsSY1 X29q8ErYz40hbztW/JtRcdj4lVkSW5KwphaWo= 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=UZvO0ETZeIaCPiWWZZjOIXku/FWhyR4uofwUXTEB9a4=; b=RcjqEIcsIrK+b7aj9Kybjtn/TfMqTBgBPUPJHCJWFyruhfkDkmVUKZcDBtIf3PeZ74 +gIHM/5wMp//H5pMP854BU5Eb6iqAYxhRxc7vUO1+pf41M6U8I+u8UKqwavNmvMxl6+E pE0kbx2RIACd4iolm/GoEZLzKLVnyDjeNO5RFdH8lw56NjDBG1AKpBQGJX/0ab4XxUaX 0M5NvYVd/FlD+tTWJ0mWWrECKCTLRqOdtTacnPwYs/4PjxJ3yMEEb9ZD8OvHjGi6D6J+ rbgIPj6zjMj2Lvjfiyc94kwMWacoyglxrmrrUibJ1IYiQg+ep7BrGLyLRCSPGry0WuHK 2zPg== X-Gm-Message-State: AA+aEWZygc5I9NlTy99T2Y3YaZxpF/G/OXZPXSsVSFPrL5WXkTxP3KDR 2w4+lHFzfuCs0E+sOJvKagCHaplcmeU= X-Google-Smtp-Source: AFSGD/VHTGngZCgQ1MSAPTvuRe4ZkjV4DouBdoEi6n8slhqM5DvV9FVTyH4Llrd/i3Fk1gZg7JAdwg== X-Received: by 2002:ac8:962:: with SMTP id z31mr17420347qth.305.1544569251816; Tue, 11 Dec 2018 15:00:51 -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 q17sm8842276qtc.19.2018.12.11.15.00.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 15:00:51 -0800 (PST) Subject: Re: [PATCH 2/3] Allow kmod to read /proc/sys/crypto/fips_enabled To: David Sugar , "selinux-refpolicy@vger.kernel.org" References: <20181208184347.32575-1-dsugar@tresys.com> <20181208184347.32575-3-dsugar@tresys.com> From: Chris PeBenito Message-ID: <5c76f5de-4ca2-0951-43f7-e8749fcc3515@ieee.org> Date: Tue, 11 Dec 2018 17:54:28 -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: <20181208184347.32575-3-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/8/18 1:45 PM, David Sugar wrote: > type=AVC msg=audit(1543769402.716:165): avc: denied { search } for > pid=6716 comm="sysctl" name="crypto" dev="proc" ino=10284 > scontext=system_u:system_r:kmod_t:s0 > tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=dir permissive=1 > type=AVC msg=audit(1543769402.716:165): avc: denied { read } for > pid=6716 comm="sysctl" name="fips_enabled" dev="proc" ino=10285 > scontext=system_u:system_r:kmod_t:s0 > tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1543769402.716:165): avc: denied { open } for > pid=6716 comm="sysctl" path="/proc/sys/crypto/fips_enabled" dev="proc" > ino=10285 scontext=system_u:system_r:kmod_t:s0 > tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1543769402.717:166): avc: denied { getattr } for > pid=6716 comm="sysctl" path="/proc/sys/crypto/fips_enabled" dev="proc" > ino=10285 scontext=system_u:system_r:kmod_t:s0 > tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file permissive=1 > > Signed-off-by: Dave Sugar > --- > policy/modules/system/modutils.te | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/policy/modules/system/modutils.te b/policy/modules/system/modutils.te > index a8125c17..73471401 100644 > --- a/policy/modules/system/modutils.te > +++ b/policy/modules/system/modutils.te > @@ -58,6 +58,7 @@ can_exec(kmod_t, kmod_exec_t) > > kernel_load_module(kmod_t) > kernel_request_load_module(kmod_t) > +kernel_read_crypto_sysctls(kmod_t) > kernel_read_system_state(kmod_t) > kernel_read_network_state(kmod_t) > kernel_write_proc_files(kmod_t) Merged. -- Chris PeBenito