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.1 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,URIBL_BLOCKED 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 73EEFC43381 for ; Tue, 12 Mar 2019 01:01:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 394E22087C for ; Tue, 12 Mar 2019 01:01:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="GOVvH3Zo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726167AbfCLBBV (ORCPT ); Mon, 11 Mar 2019 21:01:21 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:43647 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbfCLBBV (ORCPT ); Mon, 11 Mar 2019 21:01:21 -0400 Received: by mail-qt1-f194.google.com with SMTP id d16so740692qtn.10 for ; Mon, 11 Mar 2019 18:01:20 -0700 (PDT) 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=/9s6k0hHX7xke8SWZLB6wj1l64Wk2d6RBrve4Y1c4gM=; b=GOVvH3ZoEPwph6P8aP5yUB91NolSKEVskJzCMcyeXTsuhkFp2hp2fzkHuqxYvE5Dvd PlS4yEHExIUxNjaph6loHOKTQMZivgHLM5rpfTBMeDLTI9iDkdiNkWMuQMdR/MlfsiCV Ib6uq2BmRTEjp+UKCWAn8WUo2mElM5wPRxS4Q= 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=/9s6k0hHX7xke8SWZLB6wj1l64Wk2d6RBrve4Y1c4gM=; b=OxG2iLT27Nf8+yzPKsVuX31Bu8JD/DLqHuGz13CubM29jL9OG4/yIJSB/UF6f7GHnB emO5WS109Ss41xCKJzymDwSUgju43PDV2M1cmAzKZbW9t0zxvTu0Q0Rf7ftxgVYGCYWF 9xqmdxoMPjsQcRGnScmrsqTkTId2YIjlavrWsLE7smjzjbxdpkZej3kTor7EgNrgerlz qBGXA6Nhi5lHlMfSOI8FXgXkG9caKCHCqMzuVFFff6kJqw5AuUfWBGPh8W54ZL+6lwJ3 A/4aEzjL850hPXcEKTOCWc4BCpflznpCKR+soR5WYtDGbYW7pJxSmQLZd3eTcRUvVk6z YaKg== X-Gm-Message-State: APjAAAUuSkXixe5KEUe9Qm1SOl145mViJ08GsEwYAaVt5cgGGTmvNl7D EJy/74CpFsFsGdGj1k6+Pw6kYsRN2bM= X-Google-Smtp-Source: APXvYqzAVOVH9s3+BGxEdjXQ8w3HoqKw8wMhPVpI7dv6LFO2WW3Ft0yzNOJ0xWRnz6Tm7gomlewbmA== X-Received: by 2002:ac8:35b4:: with SMTP id k49mr28310330qtb.12.1552352479447; Mon, 11 Mar 2019 18:01:19 -0700 (PDT) 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 u64sm2436311qki.24.2019.03.11.18.01.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2019 18:01:19 -0700 (PDT) Subject: Re: [PATCH] Resolve denial while changing password To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20190311160147.17642-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: <686954d0-0575-5e45-149a-1a873894af9d@ieee.org> Date: Mon, 11 Mar 2019 20:57:36 -0400 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: <20190311160147.17642-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 3/11/19 12:02 PM, Sugar, David wrote: > I'm seeing the following denials reading /proc/sys/crypto/fips_enabled > and sending message for logging. This resolves those denials. > > type=AVC msg=audit(1552222811.419:470): avc: denied { search } for pid=7739 comm="passwd" name="crypto" dev="proc" ino=2253 scontext=sysadm_u:sysadm_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=dir permissive=1 > type=AVC msg=audit(1552222811.419:470): avc: denied { read } for pid=7739 comm="passwd" name="fips_enabled" dev="proc" ino=2254 scontext=sysadm_u:sysadm_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1552222811.419:470): avc: denied { open } for pid=7739 comm="passwd" path="/proc/sys/crypto/fips_enabled" dev="proc" ino=2254 scontext=sysadm_u:sysadm_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file permissive=1 > type=AVC msg=audit(1552222811.419:471): avc: denied { getattr } for pid=7739 comm="passwd" path="/proc/sys/crypto/fips_enabled" dev="proc" ino=2254 scontext=sysadm_u:sysadm_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysctl_crypto_t:s0 tclass=file permissive=1 > > type=AVC msg=audit(1552222811.431:476): avc: denied { sendto } for pid=7739 comm="passwd" path="/dev/log" scontext=sysadm_u:sysadm_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_dgram_socket permissive=1 > > Signed-off-by: Dave Sugar > --- > policy/modules/admin/usermanage.te | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/policy/modules/admin/usermanage.te b/policy/modules/admin/usermanage.te > index b4f8c78c..9d17645f 100644 > --- a/policy/modules/admin/usermanage.te > +++ b/policy/modules/admin/usermanage.te > @@ -304,6 +304,8 @@ allow passwd_t self:msg { send receive }; > allow passwd_t crack_db_t:dir list_dir_perms; > read_files_pattern(passwd_t, crack_db_t, crack_db_t) > > +kernel_dgram_send(passwd_t) > +kernel_read_crypto_sysctls(passwd_t) > kernel_read_kernel_sysctls(passwd_t) > > # for SSP Merged. I added a comment for the /dev/log usage. -- Chris PeBenito