From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DC8CE58973 for ; Sat, 30 Jan 2016 17:21:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6576821C04D; Sat, 30 Jan 2016 17:21:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0612E21C01F for ; Sat, 30 Jan 2016 17:21:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 33942340AB5 for ; Sat, 30 Jan 2016 17:21:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B71E88F5 for ; Sat, 30 Jan 2016 17:21:17 +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: <1454173372.a5ee3e4cc8dcc31a8a91cda5bebe514c15c83556.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/xserver.fc policy/modules/services/xserver.te X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: a5ee3e4cc8dcc31a8a91cda5bebe514c15c83556 X-VCS-Branch: master Date: Sat, 30 Jan 2016 17:21:17 +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-Archives-Salt: af50a962-3ca4-4aca-9fbe-0e98f8a1372b X-Archives-Hash: 3c1b1ebb91d955cdf814c15060893e8d commit: a5ee3e4cc8dcc31a8a91cda5bebe514c15c83556 Author: Nicolas Iooss m4x org> AuthorDate: Sun Dec 20 15:28:48 2015 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Jan 30 17:02:52 2016 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=a5ee3e4c Label Xorg server binary correctly on Arch Linux On Arch Linux, /usr/bin/Xorg is only a shell script which executes /usr/lib/xorg-server/Xorg.wrap, which is a SUID binary wrapper around /usr/lib/xorg-server/Xorg. Even though Xorg.wrap is not a full X server, it reads X11 configuration files, uses the DRM interface to detect KMS, etc. (cf. http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/xorg-wrapper.c?id=xorg-server-1.18.0 for more details). Therefore label it as xserver_exec_t. This makes the following AVC appear: denied { execute_no_trans } for pid=927 comm="X" path="/usr/lib/xorg-server/Xorg.wrap" dev="dm-0" ino=3152592 scontext=system_u:system_r:xserver_t tcontext=system_u:object_r:xserver_exec_t tclass=file Allow /usr/bin/Xorg to execute Xorg.wrap with a can_exec statement. policy/modules/services/xserver.fc | 2 ++ policy/modules/services/xserver.te | 3 +++ 2 files changed, 5 insertions(+) diff --git a/policy/modules/services/xserver.fc b/policy/modules/services/xserver.fc index 5ef36fb..619bb9f 100644 --- a/policy/modules/services/xserver.fc +++ b/policy/modules/services/xserver.fc @@ -71,6 +71,8 @@ HOME_DIR/\.Xauthority.* -- gen_context(system_u:object_r:xauth_home_t,s0) /usr/bin/Xorg -- gen_context(system_u:object_r:xserver_exec_t,s0) /usr/lib/qt-.*/etc/settings(/.*)? gen_context(system_u:object_r:xdm_var_run_t,s0) +/usr/lib/xorg-server/Xorg -- gen_context(system_u:object_r:xserver_exec_t,s0) +/usr/lib/xorg-server/Xorg\.wrap -- gen_context(system_u:object_r:xserver_exec_t,s0) /usr/sbin/lightdm -- gen_context(system_u:object_r:xdm_exec_t,s0) diff --git a/policy/modules/services/xserver.te b/policy/modules/services/xserver.te index 82b9501..09c79bb 100644 --- a/policy/modules/services/xserver.te +++ b/policy/modules/services/xserver.te @@ -827,6 +827,9 @@ manage_sock_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t) allow xserver_t xkb_var_lib_t:lnk_file read; can_exec(xserver_t, xkb_var_lib_t) +# Run Xorg.wrap +can_exec(xserver_t, xserver_exec_t) + # VNC v4 module in X server corenet_tcp_bind_vnc_port(xserver_t)