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

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