Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4073095pxb; Tue, 26 Jan 2021 11:38:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzs+WQj8ibF6MBN+0WWLf/tTqtXmQhGsDYgbt15wGmQoNVSVOLrBgkrhK7OLIWAkOOMo7UF X-Received: by 2002:aa7:d7c8:: with SMTP id e8mr6009600eds.355.1611689934256; Tue, 26 Jan 2021 11:38:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611689934; cv=none; d=google.com; s=arc-20160816; b=jr8X/czv4VSMXeRn945GWVtNVcGS/nn6WSaHdewnqPDuI7CYSoFhxoKVk5VLx+FPi+ kPt8357FhDPFCTkND+FDJxZHfEWmCZ/x2KMo23g/D3/P9U4MD6UDcwIg0e3WOyEUuPub ox2ZJIlo5AqH7i/H1X4anW8liGd6lCQ5rXVa4FXooe5nJWdckkT5lAfikdG+oYqaGC5T ftzUFDIxqovXXnRQHu6WYD5Uyeu+Elw42ogBPcq5cIbqVUe/3BKZ25RUTpTGz48bC/8D O1fzqXvXp5CREXIYWeyCFQSifrAQS2R0gmnwTq9jzRLrFwM3hHKERhHWW/zbMoeaIhhH FBGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=MIdUoyW2SzT3Ecj7edsqpNe78WPdyj4jn0pKr/w0c/o=; b=CaQmczfVesZTNMAwRHLuwdYP+DRRijGlMxG3LcdWfgIxwSl79eiNws9UkFQsTpdTTA owlELV2lBSTf8QUgaoRw8Pikx0Opn45f11Y3KD9i+fBWK41huWEaYzu3BTL3aD0s12/Z kiziSuzXtG/zbFzV9uGO+Djl2AgzvzsdBxrGG4u7me9pnVtoH/bX0OkwjbNRi5XjqycO g+5xuML9+WUMrVu7EN89wXFHCNf0p/4jojy18DUJpmOkIuIUBMmNVgo7eAEtl2pr1hqE AU3cU5mMZNYsK2+YvI7peGZwY+CBJW21RKHPP1EOxqc+H/cls7jmSNsDsFOchSQ8aN// EnEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=WXZAjoAI; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si7134251ejz.709.2021.01.26.11.38.46; Tue, 26 Jan 2021 11:38:54 -0800 (PST) Received-SPF: pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=WXZAjoAI; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728766AbhAZGBP (ORCPT + 16 others); 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-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