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=-5.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 B12A2C2D0DA for ; Thu, 26 Dec 2019 16:58:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 752D0206CB for ; Thu, 26 Dec 2019 16:58:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="Sf9QAECc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbfLZQ6v (ORCPT ); Thu, 26 Dec 2019 11:58:51 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:35428 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbfLZQ6u (ORCPT ); Thu, 26 Dec 2019 11:58:50 -0500 Received: by mail-qk1-f193.google.com with SMTP id z76so20157927qka.2 for ; Thu, 26 Dec 2019 08:58:50 -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=Y7VD3/vn+RuxmpMp9k+ia/KjpK9G5L5xd4gCk8P2s6k=; b=Sf9QAECccwFsrjOwkv3z2yCFsrFzpiM1GVnnuBP6sizuyLLVOQni4GehAmtjcAMpfc j1OJdZ77xCCrYtynCqog5ApCpKa7F8vIlKu5KHT0psOU9GF9CqPpjJrhni+KyOrW4FD3 kqnee/6F+ek9yWQ7NLyDie4vDoyAZB518RaTo= 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=Y7VD3/vn+RuxmpMp9k+ia/KjpK9G5L5xd4gCk8P2s6k=; b=TKaOJOP3IhQkTZiveZnNiIgXaYJVpSwic8Gn7mCc3UruY81KxXElMk5TELn8qD9G9V pGilxWcjxIWFrGlP+HW4B+XqP9hMszYS5Q1MA5oFvOkwe2Z6ZJu+S51OQ5mgZ9UoxeEC zQg9aWPJTzNA6DTkIo1CDAMtjCpVx1qDIQJYVFkIHv/mF2qJB4iM4FmEQFJ4nsGQzTRW 3jYa/tReeAbHd8a3yjV+7p/T/ptUefZIfUbXsTku8rZn0hBzH9hFSYkv2uWvgk4eiQgJ SPAFvGZZd+aC7qPkv3zwzEKrTBpwO5Bz1NpkVs8C25HH/KqwKIoGAHIWbS9c2xwmyKNN u6aQ== X-Gm-Message-State: APjAAAUWc9cq9ELSYeQ/nB56qOvU+voLPLsMvv9Uz9AyUGIBT8wU2abr YaJApAHOr29+AUPq5HMz+KhHKY/PANg= X-Google-Smtp-Source: APXvYqy6qsk4XaUD/6ZL/8qFqDAXSC6D1VHtDpYLlEbnRQuWTqh6yZvWUsciWzTloI2wE69gOVK7hg== X-Received: by 2002:a05:620a:108d:: with SMTP id g13mr38981820qkk.121.1577379529557; Thu, 26 Dec 2019 08:58:49 -0800 (PST) Received: from fedora.pebenito.net (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id v2sm8833900qkj.29.2019.12.26.08.58.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Dec 2019 08:58:49 -0800 (PST) Subject: Re: [PATCH 2/2] miscfiles: reading certs allows map permission also To: "Lawrence, Stephen" , SELinux Refpolicy References: <20191206192526.8129-1-slawrence@tresys.com> <20191206192526.8129-3-slawrence@tresys.com> From: Chris PeBenito Message-ID: Date: Thu, 26 Dec 2019 11:58:48 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191206192526.8129-3-slawrence@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/19 2:25 PM, Lawrence, Stephen wrote: > --- > policy/modules/system/miscfiles.if | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/policy/modules/system/miscfiles.if b/policy/modules/system/miscfiles.if > index df11794a..4ff82afb 100644 > --- a/policy/modules/system/miscfiles.if > +++ b/policy/modules/system/miscfiles.if > @@ -107,6 +107,7 @@ interface(`miscfiles_read_all_certs',` > > allow $1 cert_type:dir list_dir_perms; > read_files_pattern($1, cert_type, cert_type) > + allow $1 cert_type:file map; > read_lnk_files_pattern($1, cert_type, cert_type) > ') > > @@ -128,6 +129,7 @@ interface(`miscfiles_read_generic_certs',` > > allow $1 cert_t:dir list_dir_perms; > read_files_pattern($1, cert_t, cert_t) > + allow $1 cert_t:file map; > read_lnk_files_pattern($1, cert_t, cert_t) > ') Needs a separate map or mmap_read interface. I'm not aware of all cert reading requiring mmap. -- Chris PeBenito