Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6008238pxb; Mon, 14 Feb 2022 13:01:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDmd0VGKNSSZBFPJc+seLfwn57N6k/aQEpBd1OTBstTcxemazoAL3ty1VF/vjueiN8efAf X-Received: by 2002:a62:4e84:: with SMTP id c126mr749675pfb.86.1644872507131; Mon, 14 Feb 2022 13:01:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644872507; cv=none; d=google.com; s=arc-20160816; b=yNWU6VcndYCPsj5EY3h6btBqrytwP8FFpC/f4Xr27hk5mpCCh7RBP4cv1ox2Pbzsyl i9kQAmKAxMZEo08aqEZlV5UZUAccejORXxTHVN2mrpVthZtCRTKFP6K+OGtHPcSc3jwN tc8Mwpy6dHUI2Sdu3WCSmT2zmbYq4ZCE1HDlx+I3Vjq99CHxLFx2IugluXyD9J7WVuK3 QoPQTu2fC7O0aGCDGfIV8kCPbPW5S1fkv0fN2wQxC4GGs0b3uxlRsJaBF+LFZ5NWZERn iRY2xFVG3OnKuQ35f/CQ7Xt7LuS2lZ3rTXygc9tblBOBbVr1w7v5ECHhZCgGHrm1n3Uy Xrpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=c1v3Xgi0gOb8Hql+i04kwrCmn24nyTLY4GErbkMXhXQ=; b=PGM6KCx9KejRk1dQvP69AJuUyGUbEFhypb7uwiwpGIEbZt8v4eZn6NntLsLtVTJ53u H0yYHim10+D4Fw/eDEQpILjdoV8jY5/4xOLdJHQnAp2qBT+PFESkdYpgCc1VIFBRFYK8 SLtRBs9+zUIWK66xxOvBQ9c0nHfvPgdT+HILjSJ711t+L8snMZ3Vx4Qt48s2ndkm8zVf 22er3G2dDdYvVR2PoFOl3J8xSDeacYPnrPGKgFAU3MF0xImfgFHf5PHsxRNPCr5nLgly D7eWd2yf2tky8HiIjnffHvk7UFypqMII7VMQKxClv2t4ws9Cd3IjGsrc3b31dR8QH9vd Hefg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b=SNZY9KjF; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mr19si11892907pjb.153.2022.02.14.13.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:01:46 -0800 (PST) Received-SPF: pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@coker.com.au header.s=2008 header.b=SNZY9KjF; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=coker.com.au Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 150A522B34; Mon, 14 Feb 2022 12:23:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234935AbiBMKWO (ORCPT + 22 others); Sun, 13 Feb 2022 05:22:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiBMKWN (ORCPT ); Sun, 13 Feb 2022 05:22:13 -0500 Received: from smtp.sws.net.au (smtp.sws.net.au [144.76.241.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF4E25D197 for ; Sun, 13 Feb 2022 02:22:08 -0800 (PST) Received: from xev.coker.com.au (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id 22AF610D4B for ; Sun, 13 Feb 2022 21:22:06 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1644747726; bh=c1v3Xgi0gOb8Hql+i04kwrCmn24nyTLY4GErbkMXhXQ=; l=2947; h=Date:From:To:Subject:From; b=SNZY9KjFP5Iu5fpLMLkzbMQjJ/aWf3EQ6KaYBNxZ8+9AUh3XD1uqYGftn2gJlhWCy 9UZtgTJExyhlEfUPdYM4ACQgnskOH0itRkJzlK+s3Q/Al4qLD5gV+IS1R72QHzFUXf jjgL/uWwDaKEaMVPoYjYelO2G43qju3iDvmyTgSU= Received: by xev.coker.com.au (Postfix, from userid 1001) id 9BD4D172B03A; Sun, 13 Feb 2022 21:22:01 +1100 (AEDT) Date: Sun, 13 Feb 2022 21:22:01 +1100 From: Russell Coker To: selinux-refpolicy@vger.kernel.org Subject: [PATCH] dontaudit net_admin Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org This patch has dontaudit rules for some net_admin accesses that are from changing buffer sizes. The programs in question work fine like this. I think this is worthy of inclusion. Signed-off-by: Russell Coker Index: refpolicy-2.20220106/policy/modules/services/cron.te =================================================================== --- refpolicy-2.20220106.orig/policy/modules/services/cron.te +++ refpolicy-2.20220106/policy/modules/services/cron.te @@ -176,6 +176,10 @@ tunable_policy(`fcron_crond',` # Daemon local policy # +ifdef(`hide_broken_symptoms',` +# for changing buffer sizes +dontaudit crond_t self:capability net_admin; +') allow crond_t self:capability { chown dac_override dac_read_search fowner setgid setuid sys_nice sys_resource }; dontaudit crond_t self:capability { sys_tty_config }; Index: refpolicy-2.20220106/policy/modules/services/dbus.te =================================================================== --- refpolicy-2.20220106.orig/policy/modules/services/dbus.te +++ refpolicy-2.20220106/policy/modules/services/dbus.te @@ -71,6 +71,10 @@ ifdef(`enable_mls',` # Local policy # +ifdef(`hide_broken_symptoms',` +# for changing buffer sizes +dontaudit system_dbusd_t self:capability net_admin; +') allow system_dbusd_t self:capability { dac_override setgid setpcap setuid sys_resource }; dontaudit system_dbusd_t self:capability sys_tty_config; allow system_dbusd_t self:process { getattr getsched signal_perms setpgid getcap setcap setrlimit }; Index: refpolicy-2.20220106/policy/modules/services/policykit.te =================================================================== --- refpolicy-2.20220106.orig/policy/modules/services/policykit.te +++ refpolicy-2.20220106/policy/modules/services/policykit.te @@ -68,6 +68,10 @@ miscfiles_read_localization(policykit_do # Local policy # +ifdef(`hide_broken_symptoms',` +# for changing buffer sizes +dontaudit policykit_t self:capability net_admin; +') allow policykit_t self:capability { dac_override dac_read_search setgid setuid sys_nice sys_ptrace }; allow policykit_t self:process { getsched setsched signal }; allow policykit_t self:unix_stream_socket { accept connectto listen }; Index: refpolicy-2.20220106/policy/modules/services/postfix.te =================================================================== --- refpolicy-2.20220106.orig/policy/modules/services/postfix.te +++ refpolicy-2.20220106/policy/modules/services/postfix.te @@ -107,6 +107,10 @@ mta_mailserver_delivery(postfix_virtual_ # Common postfix domain local policy # +ifdef(`hide_broken_symptoms',` +# for changing buffer sizes +dontaudit postfix_domain self:capability net_admin; +') allow postfix_domain self:capability { sys_chroot sys_nice }; dontaudit postfix_domain self:capability sys_tty_config; allow postfix_domain self:process { signal_perms setpgid setsched };