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 AD79313835B for ; Sat, 28 Nov 2020 23:09:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F110EE0829; Sat, 28 Nov 2020 23:09:33 +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 D377DE0829 for ; Sat, 28 Nov 2020 23:09:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 C857634164C for ; Sat, 28 Nov 2020 23:09:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21A63474 for ; Sat, 28 Nov 2020 23:09:30 +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: <1605517423.de9c38bc9643b4d761a7eff93400c2232d75220c.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/, policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/filesystem.if policy/modules/system/xen.te X-VCS-Directories: policy/modules/kernel/ policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: de9c38bc9643b4d761a7eff93400c2232d75220c X-VCS-Branch: master Date: Sat, 28 Nov 2020 23:09:30 +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: 7e5ce2d9-9cb5-468d-978d-8ed1de445882 X-Archives-Hash: 00a2204f605ab79a2a2a5f9e803f0fc6 commit: de9c38bc9643b4d761a7eff93400c2232d75220c Author: Anthony PERARD citrix com> AuthorDate: Tue Oct 27 17:22:28 2020 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Nov 16 09:03:43 2020 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=de9c38bc xen: Allow xenstored to map /proc/xen/xsd_kva xenstored is using mmap() on /proc/xen/xsd_kva, and when the SELinux boolean "domain_can_mmap_files" in CentOS is set to false the mmap() call fails. Signed-off-by: Anthony PERARD citrix.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/kernel/filesystem.if | 18 ++++++++++++++++++ policy/modules/system/xen.te | 1 + 2 files changed, 19 insertions(+) diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if index aa855bd0..05ddc598 100644 --- a/policy/modules/kernel/filesystem.if +++ b/policy/modules/kernel/filesystem.if @@ -5328,6 +5328,24 @@ interface(`fs_manage_xenfs_files',` manage_files_pattern($1, xenfs_t, xenfs_t) ') +######################################## +## +## Map files a XENFS filesystem. +## +## +## +## Domain allowed access. +## +## +# +interface(`fs_mmap_xenfs_files',` + gen_require(` + type xenfs_t; + ') + + allow $1 xenfs_t:file map; +') + ######################################## ## ## Do not audit attempts to create, diff --git a/policy/modules/system/xen.te b/policy/modules/system/xen.te index 2c95d0ca..82328cbb 100644 --- a/policy/modules/system/xen.te +++ b/policy/modules/system/xen.te @@ -459,6 +459,7 @@ files_read_usr_files(xenstored_t) fs_search_xenfs(xenstored_t) fs_manage_xenfs_files(xenstored_t) +fs_mmap_xenfs_files(xenstored_t) term_use_generic_ptys(xenstored_t)