From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15DD5C433F5 for ; Wed, 16 Feb 2022 11:55:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbiBPLzR (ORCPT ); Wed, 16 Feb 2022 06:55:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232740AbiBPLzQ (ORCPT ); Wed, 16 Feb 2022 06:55:16 -0500 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2377C25B2FC for ; Wed, 16 Feb 2022 03:55:03 -0800 (PST) Received: by mail-qv1-xf2f.google.com with SMTP id c14so1782615qvl.12 for ; Wed, 16 Feb 2022 03:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=KxCnI4Fe2cttkztd8C98KELOGT9Oy7EbdAkFC+zXmu0=; b=JOjU4jBsKpY9BrstCujw7ww6WuU9mtKFqn/dfkazGo+GGagEqrUuxDcVNxYel8DxKD jOERctM2zt45/9Fl48EvZ4Kxh1b/+SPX8Mqw2tYxtNd/Aemdr9+OMNoR9FfviGpa4BQ6 1w42xggRRLkLNxTTTUCT2CamoNEoQnA6NB6PQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=KxCnI4Fe2cttkztd8C98KELOGT9Oy7EbdAkFC+zXmu0=; b=10h7LkW81L3YFqjVfSuTn1a1OKkDcxrlQDEMQrPV+Wf1J32Yk6GoutVbuXp4qiS85Z n6Yj0YoPYVriVxXXx7LsxuSc0XReQ4DgzRA3m0rIs9FC1JFwIbwF3+8WYKL9CAhKep7l pR5BQJ+IXfQxusLzIix6mXqaGA1RI0CbKFryEe+Lb3oPlWasnz82ckUUmoJ82iir6pil VE6N+RtSQPoKKW+qlNDzF6cxy7hSOv2yJMOEVohYhUVWWSD/I+Rc0B8ak8DAIhJ3Lt3W Zr+I043N8jJqHq5YKg4wG+I3s6FqAhKpuJSe3jIFQuVezlfSP2iScpdN3nDb0eSLnJoX /iUA== X-Gm-Message-State: AOAM532yzoV+GLtomj4p/Bz0oGoxKUjaoymby2qUt/uwc5robZPuMjIP dGUwF8m5IOHV52ZE3SjKdYxPivNN58sScA== X-Google-Smtp-Source: ABdhPJxNSuNoJ+JnDBzcFafcxike11P3bSjN3noiACZ5V2aG5oSkybj2E7vosuwdhZDrs/Q+6tJ22Q== X-Received: by 2002:a05:6214:2527:b0:42d:512d:ee13 with SMTP id gg7-20020a056214252700b0042d512dee13mr1441869qvb.12.1645012502296; Wed, 16 Feb 2022 03:55:02 -0800 (PST) Received: from [192.168.1.126] ([72.85.44.115]) by smtp.gmail.com with ESMTPSA id s34sm21505032qtc.88.2022.02.16.03.55.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Feb 2022 03:55:01 -0800 (PST) Message-ID: <8b79c7da-e7be-024f-bd6e-7f9f41ff7a4a@ieee.org> Date: Wed, 16 Feb 2022 06:40:07 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] dontaudit net_admin Content-Language: en-US To: Russell Coker , selinux-refpolicy@vger.kernel.org References: From: Chris PeBenito In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 2/13/22 05:22, Russell Coker wrote: > 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 I'm onboard with the rule additions but am unsure on the the broken symptoms. I I'm unsure having that block has real value, since it's always on and I've never heard anyone turning it off. > 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 }; -- Chris PeBenito