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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E07A8158083 for ; Sun, 22 Sep 2024 00:03:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80D3CE29C3; Sun, 22 Sep 2024 00:03:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 pigeon.gentoo.org (Postfix) with ESMTPS id 6AF49E29C0 for ; Sun, 22 Sep 2024 00:03:41 +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 9064034317B for ; Sun, 22 Sep 2024 00:03:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C6402807 for ; Sun, 22 Sep 2024 00:03:36 +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: <1726957709.a909c09a7716cdd655acc0bd96210e6bfa244e0b.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/systemd.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: a909c09a7716cdd655acc0bd96210e6bfa244e0b X-VCS-Branch: master Date: Sun, 22 Sep 2024 00:03:36 +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: 5a0bc6e2-af55-4eca-b3c0-41eec200043d X-Archives-Hash: f1a661e7a242c5ce1fc3489cc7477b81 commit: a909c09a7716cdd655acc0bd96210e6bfa244e0b Author: Yi Zhao windriver com> AuthorDate: Mon Aug 12 08:17:29 2024 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Sep 21 22:28:29 2024 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=a909c09a systemd: allow system --user to create netlink_route_socket Fixes: avc: denied { create } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { getopt } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { setopt } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { bind } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { getattr } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { write } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { nlmsg_read } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { read } for pid=373 comm="systemd" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=netlink_route_socket permissive=1 avc: denied { sendto } for pid=378 comm="(ystemctl)" scontext=root:sysadm_r:sysadm_systemd_t tcontext=root:sysadm_r:sysadm_systemd_t tclass=unix_dgram_socket permissive=1 Signed-off-by: Yi Zhao windriver.com> Signed-off-by: Jason Zaman gentoo.org> policy/modules/system/systemd.if | 2 ++ 1 file changed, 2 insertions(+) diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if index a9c8a1a5a..b9dbd97cc 100644 --- a/policy/modules/system/systemd.if +++ b/policy/modules/system/systemd.if @@ -61,6 +61,8 @@ template(`systemd_role_template',` # remainder of the rules. allow $1_systemd_t self:process { getsched signal }; allow $1_systemd_t self:netlink_kobject_uevent_socket create_socket_perms; + allow $1_systemd_t self:netlink_route_socket r_netlink_socket_perms; + allow $1_systemd_t self:unix_dgram_socket { create_socket_perms sendto }; allow $1_systemd_t self:unix_stream_socket create_stream_socket_perms; allow $1_systemd_t $3:process { rlimitinh setsched signal_perms }; corecmd_shell_domtrans($1_systemd_t, $3)