Blame SOURCES/0008-selinux-policy-allow-custodia-to-access-proc-cpuinfo_rhbz#1998129.patch

c14a06
From 07e2bf732f54f936cccc4e0c7b468d77f97e911a Mon Sep 17 00:00:00 2001
c14a06
From: Florence Blanc-Renaud <flo@redhat.com>
c14a06
Date: Mon, 30 Aug 2021 18:40:24 +0200
c14a06
Subject: [PATCH] selinux policy: allow custodia to access /proc/cpuinfo
c14a06
c14a06
On aarch64, custodia creates AVC when accessing /proc/cpuinfo.
c14a06
c14a06
According to gcrypt manual
c14a06
(https://gnupg.org/documentation/manuals/gcrypt/Configuration.html),
c14a06
/proc/cpuinfo is used on ARM architecture to read the hardware
c14a06
capabilities of the CPU. This explains why the issue happens only
c14a06
on aarch64.
c14a06
c14a06
audit2allow suggests to add the following:
c14a06
allow ipa_custodia_t proc_t:file { getattr open read };
c14a06
c14a06
but this policy would be too broad. Instead, the patch is using
c14a06
the interface kernel_read_system_state.
c14a06
c14a06
Fixes: https://pagure.io/freeipa/issue/8972
c14a06
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
c14a06
Reviewed-By: Christian Heimes <cheimes@redhat.com>
c14a06
---
c14a06
 selinux/ipa.te | 1 +
c14a06
 1 file changed, 1 insertion(+)
c14a06
c14a06
diff --git a/selinux/ipa.te b/selinux/ipa.te
c14a06
index 68e109419..7492fca04 100644
c14a06
--- a/selinux/ipa.te
c14a06
+++ b/selinux/ipa.te
c14a06
@@ -364,6 +364,7 @@ files_tmp_filetrans(ipa_custodia_t, ipa_custodia_tmp_t, { dir file })
c14a06
 
c14a06
 kernel_dgram_send(ipa_custodia_t)
c14a06
 kernel_read_network_state(ipa_custodia_t)
c14a06
+kernel_read_system_state(ipa_custodia_t)
c14a06
 
c14a06
 auth_read_passwd(ipa_custodia_t)
c14a06
 
c14a06
-- 
c14a06
2.31.1
c14a06