Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp132362pxb; Wed, 20 Jan 2021 03:09:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJizq63eRJ4hpd+wSNgtIEVniiz4NdHzRs6gtVY8sd3JDe/iyksLQbi7o7BnzLdhB4MiB3 X-Received: by 2002:aa7:cdc7:: with SMTP id h7mr7129015edw.353.1611140980487; Wed, 20 Jan 2021 03:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611140980; cv=none; d=google.com; s=arc-20160816; b=LYQ4RpVBpMjOg7kXg0a3CEi3gLTjbg91wNOfMP6aOcRseZc6mvS76DHgTvxrfnWEzc t8XmK1izygpV4zmseGGrNCCNFrfrtOHF4oJ9v51M6Zna9XoudU/FwH9y03aqWYJdbCR0 2D1pzOUvZ7ibXk48NjrytEOYH/qNvlRKwWX87MVvk6Z7PS7qs8NLtOmCSqYVG23Wpc7q DbMaasm36yzvx7JDH4Jflrt9H97r1rYUEl8ItFuT6lNHFaX5bZn/wY6b+RERn4y71aPH fISAL59yzLa5VId9+R4L6PPq05IRNxWcEpIagRsHXWs/7N1cnJThu4FyZEuoGFmqz9+d CUpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=V80CvG3iSGEwHGHnt4z6Xr2+12mKQsMitKfMQUhXApo=; b=hFUeqMOihZnO/DLSbpWyUSgZYebcafSbRXtZAiZylPi1BGtklZ9fai303U1J1+2ydM D4Ulg465aP6noCPM720CY894bSvV1dTfAJBt4UpX0Wf5g0r1zI0L/f8v74uy29u+3GS8 Ap4ihSz0pe6oy9QNuNNH/0HAr1MY0dHh+svFpKvQuP8cYzrE6lW9fDEiN85QN9ZWes7i f2SGe3MVQvjV9RTfMHu2+Za12cN6ZV5Gyyi6pvmevEMl9W1bzB1Ho7aU7d3fWMdSmjdV yKWoh0tJmwDJXv1xrC3XgyrMXELtGd+NEd5WqvXCDGZE1zF/iiRmrfwFv9NEkfdTzg2z TS4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b=qKokA5Cl; 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=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si714611edy.91.2021.01.20.03.09.33; Wed, 20 Jan 2021 03:09:40 -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=@coker.com.au header.s=2008 header.b=qKokA5Cl; 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=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728856AbhATLGy (ORCPT + 16 others); Wed, 20 Jan 2021 06:06:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731468AbhATJeE (ORCPT ); Wed, 20 Jan 2021 04:34:04 -0500 Received: from smtp.sws.net.au (smtp.sws.net.au [IPv6:2a01:4f8:140:71f5::dada:cafe]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A6F5C061575 for ; Wed, 20 Jan 2021 01:32:28 -0800 (PST) Received: from xev.coker.com.au (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id 0345316DA1 for ; Wed, 20 Jan 2021 20:32:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1611135144; bh=V80CvG3iSGEwHGHnt4z6Xr2+12mKQsMitKfMQUhXApo=; l=2915; h=Date:From:To:Subject:From; b=qKokA5Cl973+yQxywa+cGIfiQcFjAOUa/8zDK+TJuDp9TbykCBvBcjnYjAIRnuHI7 4lQ5erwiTXB3gpJe8qye4BHXDjrqr78tUn7Pgq6JQx7X6ixf4888aRXhuc3RwevXIR MiYkc+m+mFneF+dV34QsV+w1lwYFZO1xwvAsdqwE= Received: by xev.coker.com.au (Postfix, from userid 1001) id 30E6E131FB08; Wed, 20 Jan 2021 20:32:19 +1100 (AEDT) Date: Wed, 20 Jan 2021 20:32:19 +1100 From: Russell Coker To: selinux-refpolicy@vger.kernel.org Subject: [PATCH] more Chrome stuff Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org 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. ## ##