From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9E8171582EF for ; Sat, 08 Mar 2025 23:55:23 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 8B335343089 for ; Sat, 08 Mar 2025 23:55:23 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 5BA001103CB; Sat, 08 Mar 2025 23:55:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 5476411046F for ; Sat, 08 Mar 2025 23:55:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 04A6D3408DD for ; Sat, 08 Mar 2025 23:55:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4486D28A4 for ; Sat, 08 Mar 2025 23:55:04 +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: <1741474868.ae33618746dea07d4a275b09c0980e387a9d1cb5.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/tpm2.te X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: ae33618746dea07d4a275b09c0980e387a9d1cb5 X-VCS-Branch: master Date: Sat, 08 Mar 2025 23:55:04 +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: 0ca96523-b689-4ebf-a28a-50949afe89bf X-Archives-Hash: 76ae24418134fc72151960b94f95d574 commit: ae33618746dea07d4a275b09c0980e387a9d1cb5 Author: Tianjia Zhang linux alibaba com> AuthorDate: Thu Dec 26 12:03:50 2024 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Mar 8 23:01:08 2025 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=ae336187 tpm2: allow tpm-abrmd to access urandom The read permissions to /dev/urandom should is needed: [ 5445.537739] audit: type=1400 audit(1737007412.134:1085): avc: denied { read } for pid=8499 comm="tpm2-abrmd" name="urandom" dev="devtmpfs" ino=10 scontext=system_u:system_r:tpm2_abrmd_t:s0-s15:c0.c1023 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file permissive=1 [ 5445.540088] audit: type=1400 audit(1737007412.134:1086): avc: denied { open } for pid=8499 comm="tpm2-abrmd" path="/dev/urandom" dev="devtmpfs" ino=10 scontext=system_u:system_r:tpm2_abrmd_t:s0-s15:c0.c1023 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file permissive=1 Signed-off-by: Tianjia Zhang linux.alibaba.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/services/tpm2.te | 2 ++ 1 file changed, 2 insertions(+) diff --git a/policy/modules/services/tpm2.te b/policy/modules/services/tpm2.te index 48173de1b..74fa42c69 100644 --- a/policy/modules/services/tpm2.te +++ b/policy/modules/services/tpm2.te @@ -31,6 +31,8 @@ kernel_read_system_state(tpm2_abrmd_t) logging_send_syslog_msg(tpm2_abrmd_t) +dev_read_urand(tpm2_abrmd_t) + optional_policy(` dbus_system_domain(tpm2_abrmd_t, tpm2_abrmd_exec_t) ')