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=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 2F642C16A69 for ; Tue, 26 Jan 2021 17:00:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6AB723122 for ; Tue, 26 Jan 2021 17:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728766AbhAZGBP (ORCPT ); Tue, 26 Jan 2021 01:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbhAYOkX (ORCPT ); Mon, 25 Jan 2021 09:40:23 -0500 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5DFAC061574 for ; Mon, 25 Jan 2021 06:38:56 -0800 (PST) Received: by mail-qt1-x82c.google.com with SMTP id o18so9741265qtp.10 for ; Mon, 25 Jan 2021 06:38:56 -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=MIdUoyW2SzT3Ecj7edsqpNe78WPdyj4jn0pKr/w0c/o=; b=WXZAjoAISq9r4jpZZr5I8XiO4Q2tDsuyunMjM0s8ZfI9k6eYgQIwlmIO5fhPBrb4sm mDSSALQpugKDbAUGzareuG28u+R7iyZzYNf7MZsXXlaHrcub2A/DGXM6pnLymjO9EMCQ g2kcv8iFQYAD7oIJD/x/y2w2WiKI7LtdB/epw= 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=MIdUoyW2SzT3Ecj7edsqpNe78WPdyj4jn0pKr/w0c/o=; b=oL30dpYxk7RpUOpfFpAI2pVeiSCDt6zFqFbBij7Y1hZ2SCdmPx4pTPfblBqHNS9hVD yr2cx/SNLYRq+gCegSzPpzAbbGQzOS9RscEXHfIzSK7u64y1REc7Fz3s8zRN2cZa2kEV EmM3ORyGlxZAk2DEYNpYALOozhlatiRKTLMpCyRvfOojT7sy8gkRueoV/NO6eTwq9DZv pZtu6ZNcx0YXPx88eInJVrKcoV0k2jaygUk7hvxw4m0rcLODNOWk2TlJ93+T/S/iuys8 3IhjJDzUmaUcjveQH1IcYvxsYR93ibn0r+wXPBQt/bR+3+Hssbw0k9xJt4SfygIPd0O0 2uVA== X-Gm-Message-State: AOAM532RADRnd1qUFa/KWmDsqN3g2zrpah+2FFiZWHS7l+sGZUkA9VlW yuypF3KCCSBwzejI5KDLKLDPC0qkhKUQpg== X-Google-Smtp-Source: ABdhPJw/BJ8T7VkucIVhBW2Fcxx6rmJgKFO9Tu/EMmRkK9SRQZXG9Nn3TosBun6092CzpJQ4N7rksQ== X-Received: by 2002:ac8:1408:: with SMTP id k8mr727994qtj.204.1611585535779; Mon, 25 Jan 2021 06:38:55 -0800 (PST) Received: from fedora.pebenito.net (pool-96-234-173-17.bltmmd.fios.verizon.net. [96.234.173.17]) by smtp.gmail.com with ESMTPSA id y56sm11727136qty.94.2021.01.25.06.38.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jan 2021 06:38:55 -0800 (PST) Subject: Re: [PATCH] more Chrome stuff To: Russell Coker , selinux-refpolicy@vger.kernel.org References: From: Chris PeBenito Message-ID: <9026bc26-8f2c-92a1-6a51-5618f60b4f26@ieee.org> Date: Mon, 25 Jan 2021 09:38:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 1/20/21 4:32 AM, Russell Coker wrote: > Patches for some more Chrome stuff > > Signed-off-by: Russell Coker > > Index: refpolicy-2.20210120/policy/modules/apps/chromium.te > =================================================================== > --- refpolicy-2.20210120.orig/policy/modules/apps/chromium.te > +++ refpolicy-2.20210120/policy/modules/apps/chromium.te > @@ -90,7 +90,9 @@ xdg_cache_content(chromium_xdg_cache_t) > # > > # execmem for load in plugins > -allow chromium_t self:process { execmem getsched getcap setcap setrlimit setsched sigkill signal }; > +allow chromium_t self:process { execmem getsched getcap setcap setrlimit setsched sigkill signal signull }; > +allow chromium_t self:dir { write add_name }; > +allow chromium_t self:file create; > allow chromium_t self:fifo_file rw_fifo_file_perms; > allow chromium_t self:sem create_sem_perms; > allow chromium_t self:netlink_kobject_uevent_socket client_stream_socket_perms; > @@ -144,7 +146,12 @@ dyntrans_pattern(chromium_t, chromium_re > domtrans_pattern(chromium_t, chromium_sandbox_exec_t, chromium_sandbox_t) > domtrans_pattern(chromium_t, chromium_naclhelper_exec_t, chromium_naclhelper_t) > > +# for self:file create > +kernel_associate_proc(chromium_t) > + > +kernel_get_sysvipc_info(chromium_t) > kernel_list_proc(chromium_t) > +kernel_read_crypto_sysctls(chromium_t) > kernel_read_fs_sysctls(chromium_t) > kernel_read_kernel_sysctls(chromium_t) > kernel_read_net_sysctls(chromium_t) > @@ -156,6 +163,7 @@ corecmd_exec_shell(chromium_t) > corenet_tcp_connect_all_unreserved_ports(chromium_t) > corenet_tcp_connect_ftp_port(chromium_t) > corenet_tcp_connect_http_port(chromium_t) > +corenet_tcp_connect_ipp_port(chromium_t) > corenet_udp_bind_generic_node(chromium_t) > corenet_udp_bind_all_unreserved_ports(chromium_t) > > @@ -325,6 +333,9 @@ userdom_use_user_terminals(chromium_rend > > xdg_read_config_files(chromium_renderer_t) > > +# should we have a tunable for this? > +xdg_read_pictures(chromium_t) > + > xserver_user_x_domain_template(chromium_renderer, chromium_renderer_t, chromium_tmpfs_t) > > tunable_policy(`chromium_read_system_info',` > Index: refpolicy-2.20210120/policy/modules/kernel/kernel.if > =================================================================== > --- refpolicy-2.20210120.orig/policy/modules/kernel/kernel.if > +++ refpolicy-2.20210120/policy/modules/kernel/kernel.if > @@ -2442,6 +2442,24 @@ interface(`kernel_rw_all_sysctls',` > > ######################################## > ## > +## Associate a file to proc_t (/proc) > +## > +## > +## > +## Domain allowed access. > +## > +## > +## > +# > +interface(`kernel_associate_proc',` > + gen_require(` > + type proc_t; > + ') > + allow $1 proc_t:filesystem associate; > +') > + > +######################################## > +## > ## Send a kill signal to unlabeled processes. > ## > ## Merged. -- Chris PeBenito