From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 66DBB13835B for ; Mon, 22 Mar 2021 00:21:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE9D5E08EC; Mon, 22 Mar 2021 00:21:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9148CE08EC for ; Mon, 22 Mar 2021 00:21:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 35211335D91 for ; Mon, 22 Mar 2021 00:21:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 929CB5D2 for ; Mon, 22 Mar 2021 00:21:23 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1616364455.2c0357f7e69e0d75c52933bd88771b17d0c39aa6.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/apps/, policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/apps/pulseaudio.te policy/modules/services/bluetooth.if policy/modules/services/bluetooth.te X-VCS-Directories: policy/modules/services/ policy/modules/apps/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 2c0357f7e69e0d75c52933bd88771b17d0c39aa6 X-VCS-Branch: master Date: Mon, 22 Mar 2021 00:21:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e4b5b696-b316-4465-b872-b8a8805c7004 X-Archives-Hash: 856c68221e901bbff7df379447bd5152 commit: 2c0357f7e69e0d75c52933bd88771b17d0c39aa6 Author: Jason Zaman gentoo org> AuthorDate: Sun Feb 21 05:18:52 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Mar 21 22:07:35 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=2c0357f7 bluetooth: Add bluetooth_socket perms - Needs bluetooth/alg_socket access - pulse needs shutdown perms on the socket - also needs to read udev db Signed-off-by: Jason Zaman gentoo.org> policy/modules/apps/pulseaudio.te | 1 + policy/modules/services/bluetooth.if | 3 ++- policy/modules/services/bluetooth.te | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/policy/modules/apps/pulseaudio.te b/policy/modules/apps/pulseaudio.te index fd2df71a..ceb954e4 100644 --- a/policy/modules/apps/pulseaudio.te +++ b/policy/modules/apps/pulseaudio.te @@ -54,6 +54,7 @@ allow pulseaudio_t self:process { getcap getsched setcap setrlimit setsched sign allow pulseaudio_t self:fifo_file rw_fifo_file_perms; allow pulseaudio_t self:unix_stream_socket { accept connectto listen }; allow pulseaudio_t self:unix_dgram_socket sendto; +allow pulseaudio_t self:bluetooth_socket shutdown; allow pulseaudio_t self:tcp_socket { accept listen }; allow pulseaudio_t self:netlink_kobject_uevent_socket create_socket_perms; diff --git a/policy/modules/services/bluetooth.if b/policy/modules/services/bluetooth.if index e35e8631..3e4b0e5f 100644 --- a/policy/modules/services/bluetooth.if +++ b/policy/modules/services/bluetooth.if @@ -66,7 +66,8 @@ interface(`bluetooth_stream_connect',` ') files_search_runtime($1) - allow $1 bluetooth_t:socket rw_socket_perms; + allow $1 bluetooth_t:fd use; + allow $1 bluetooth_t:socket { rw_socket_perms shutdown }; stream_connect_pattern($1, bluetooth_runtime_t, bluetooth_runtime_t, bluetooth_t) ') diff --git a/policy/modules/services/bluetooth.te b/policy/modules/services/bluetooth.te index 69a38543..fcf0c177 100644 --- a/policy/modules/services/bluetooth.te +++ b/policy/modules/services/bluetooth.te @@ -60,6 +60,8 @@ allow bluetooth_t self:socket create_stream_socket_perms; allow bluetooth_t self:unix_stream_socket { accept connectto listen }; allow bluetooth_t self:tcp_socket { accept listen }; allow bluetooth_t self:netlink_kobject_uevent_socket create_socket_perms; +allow bluetooth_t self:bluetooth_socket server_stream_socket_perms; +allow bluetooth_t self:alg_socket create_stream_socket_perms; read_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_t) @@ -156,6 +158,10 @@ optional_policy(` ppp_domtrans(bluetooth_t) ') +optional_policy(` + udev_read_runtime_files(bluetooth_t) +') + ######################################## # # Helper local policy