Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp782445pxb; Wed, 16 Feb 2022 04:26:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKhqhk/+To4nPRDQSqPw63z8K4xHpFnzqscmB84nEuIuppBU2kPqilXO2nlJQ3vi6iGTV8 X-Received: by 2002:a63:eb02:0:b0:370:41e4:6ae6 with SMTP id t2-20020a63eb02000000b0037041e46ae6mr2085060pgh.229.1645014360962; Wed, 16 Feb 2022 04:26:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645014360; cv=none; d=google.com; s=arc-20160816; b=E6w2ylntQu6hk3B5fTnA2q6x+52uk3jR3Wfw5ZN6PuQGR8X/Nlb9lp4nSj/Fhvr8GS tRtTUUJeTcFEW+VlN5ssAZvf0+SMqObqVMzJu0X1OKBavccWiot5GbpzUW/R070Rp6Am tW2mwpOtq/SL1MWRTESnyXKNOdP6LmgissJ2OVuGL6Ds1N45v0bUfx8EOfoE5nsam0ry AbwFja9Dag54ND56vmN0rjZ5nUgqRN3lffqYkwygzGSldy24XPFEW2Pbax/63CTawGeI CfZjEZbrsQDflKTWMlXG+Lq9uSXC8LkpZqel5wx5zmThAoFM/MVHZXT1aEROgaoRvDYp 5OWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=KxCnI4Fe2cttkztd8C98KELOGT9Oy7EbdAkFC+zXmu0=; b=ZQtEGUZpe/RqbTFxmGVandDp6pd15i8Ny5EIbmXc8gjhhf0Qw49cOIMxoG2k94C0Eb QQpAveKGoH0YRmmWh5+z1swk7MG8wWpg06HXvYc6PfJQo3GphqBPjVQ+l/b6xZ3WWDUQ ynMf9ZsOfSlaMPSlkVA7GBJscZYAgyjO+gG3PSFBcw/5QWP+/WePtiksXyUcEKmoMqwG vqR25s0MK9LL+B1uv9LUEC7B2bnSdpNC3fYo92cHqJ6HgqJruew8/Ka/2y5wKmC1g4G6 63FvIEiJwIaps6cRbJLaDjxUJ3Ls6MpBsPZNh08ljroLDyrFah3SyHgdhuR1888HBJpG 98ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=JOjU4jBs; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ieee.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6si4424351pgs.642.2022.02.16.04.25.56; Wed, 16 Feb 2022 04:26:00 -0800 (PST) Received-SPF: pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=JOjU4jBs; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbiBPLzR (ORCPT + 22 others); 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-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 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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