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 BE7EB158087 for ; Sun, 30 Jan 2022 01:22:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B68B2BC028; Sun, 30 Jan 2022 01:22:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 46BB22BC028 for ; Sun, 30 Jan 2022 01:22:50 +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 709B1343375 for ; Sun, 30 Jan 2022 01:22:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 435602C3 for ; Sun, 30 Jan 2022 01:22:45 +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: <1643505162.79b0ec7e2d66dadd3570e99801632ac32cfe0147.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/, policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/container.if policy/modules/system/iptables.te X-VCS-Directories: policy/modules/system/ policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 79b0ec7e2d66dadd3570e99801632ac32cfe0147 X-VCS-Branch: master Date: Sun, 30 Jan 2022 01:22:45 +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: 00851541-feeb-4b75-9182-080edb98a563 X-Archives-Hash: 4fe847f6a3fe7e60a9a981878ee35905 commit: 79b0ec7e2d66dadd3570e99801632ac32cfe0147 Author: Kenton Groombridge concord sh> AuthorDate: Sat Dec 4 18:43:43 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Jan 30 01:12:42 2022 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=79b0ec7e container, iptables: dontaudit iptables rw on /ptmx Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Jason Zaman gentoo.org> policy/modules/services/container.if | 19 +++++++++++++++++++ policy/modules/system/iptables.te | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/policy/modules/services/container.if b/policy/modules/services/container.if index d7ad3e84..92b5a2f7 100644 --- a/policy/modules/services/container.if +++ b/policy/modules/services/container.if @@ -611,6 +611,25 @@ interface(`container_manage_sock_files',` manage_sock_files_pattern($1, container_file_t, container_file_t) ') +######################################## +## +## Do not audit attempts to read +## and write container chr files. +## +## +## +## Domain allowed access. +## +## +# +interface(`container_dontaudit_rw_chr_files',` + gen_require(` + type container_file_t; + ') + + dontaudit $1 container_file_t:chr_file rw_chr_file_perms; +') + ######################################## ## ## Allow the specified domain to diff --git a/policy/modules/system/iptables.te b/policy/modules/system/iptables.te index f61b8af1..39ce924d 100644 --- a/policy/modules/system/iptables.te +++ b/policy/modules/system/iptables.te @@ -105,6 +105,11 @@ ifdef(`hide_broken_symptoms',` dev_dontaudit_write_mtrr(iptables_t) ') +optional_policy(` + # iptables may try to rw /ptmx in a container + container_dontaudit_rw_chr_files(iptables_t) +') + optional_policy(` fail2ban_append_log(iptables_t) ')