Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CDD8C282C4 for ; Sat, 9 Feb 2019 14:07:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 033352084D for ; Sat, 9 Feb 2019 14:07:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="EVXKulnZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726832AbfBIOHn (ORCPT ); Sat, 9 Feb 2019 09:07:43 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:44579 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfBIOHn (ORCPT ); Sat, 9 Feb 2019 09:07:43 -0500 Received: by mail-qk1-f196.google.com with SMTP id r21so3824096qkl.11 for ; Sat, 09 Feb 2019 06:07:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=zKbUGEJSjntKuiqUloZMJXHucZgOvIF91MJa47SnFMA=; b=EVXKulnZgmitE2rMk1JXG5jC54kfrsEQd91W3DnzU2iLueh850i8MxZDICV/6Eow8U poxfh6fDQhfeGAAzjOgCisXWkx4DOzS7T/6jsTHElSHjFXk5K2rIPo2sOFsXfi8bnLWp 4jIZkODCGanOc91r2wBNSN9QfQ2gpVJFkLaeI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zKbUGEJSjntKuiqUloZMJXHucZgOvIF91MJa47SnFMA=; b=DlC+lS0wqglHtut2oXPC0ykPZJ6rz4lP/khkoZnCTi0iDIXHJ4UPb3xPm9CP2w1Fik PxOzCiA9w9eVvrgEdrzzhFPn0wWvVfRfqtV9ZSzUrQiQuM75kfcI6DO2bP88EGIk30N4 fzKOD56ypPnYjhcxCKfQLAbLH+weOqE2s0ATLha/c/2Z5OXjdWfYHlugsGe20HGV72Ig g6s6jV+92vxRrjtgEKtpELZveezXzM+ViWaLGbychMyxqYXDmsaJv85qzSIK5ObT7sea mBUyd3rqIHQlsyZO4XXARQL2owkTkDpY9Hpal6Aap0OSPwBnKPhPXsA9Rj5icB8BXtk3 TT6w== X-Gm-Message-State: AHQUAuYrQRiAyKMXyChMhuPlEGHTS1LcNQk/BUK8qbmNRVw9YR2JRSN8 2bZozi7MJoXHNZMSUWpb/mwDhaIUoLY= X-Google-Smtp-Source: AHgI3IZwlXq06xuKSrIL4JGrWCPQMRLG8TAKrQXmL6GjbLAALOrrltTX5kZng+JGxIrvm96rpazlhQ== X-Received: by 2002:a37:7f41:: with SMTP id a62mr20300569qkd.247.1549721261790; Sat, 09 Feb 2019 06:07:41 -0800 (PST) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id x202sm6479120qka.67.2019.02.09.06.07.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Feb 2019 06:07:40 -0800 (PST) Subject: Re: [PATCH] Allow systemd-networkd to get IP address from dhcp server To: "Sugar, David" , "selinux-refpolicy@vger.kernel.org" References: <20190207211422.10855-1-dsugar@tresys.com> From: Chris PeBenito Message-ID: Date: Sat, 9 Feb 2019 09:07:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190207211422.10855-1-dsugar@tresys.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 2/7/19 4:15 PM, Sugar, David wrote: > I'm seeing the following denials when attempting to get a DHCP address. > > type=AVC msg=audit(1549471325.440:199): avc: denied { name_bind } for pid=6964 comm="systemd-network" src=68 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:dhcpc_port_t:s0 tclass=udp_socket permissive=1 > type=AVC msg=audit(1549471325.440:199): avc: denied { node_bind } for pid=6964 comm="systemd-network" saddr=10.1.12.61 src=68 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:node_t:s0 tclass=udp_socket permissive=1 > type=AVC msg=audit(1549471325.440:199): avc: denied { net_bind_service } for pid=6964 comm="systemd-network" capability=10 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:system_r:systemd_networkd_t:s0 tclass=capability permissive=1 > type=SYSCALL msg=audit(1549471325.440:199): arch=c000003e syscall=49 success=yes exit=0 a0=b a1=7fff09388780 a2=10 a3=7fff09388778 items=0 ppid=1 pid=6964 auid=4294967295 uid=192 gid=192 euid=192 suid=192 fsuid=192 egid=192 sgid=192 fsgid=192 tty=(none) ses=4294967295 comm="systemd-network" exe="/usr/lib/systemd/systemd-networkd" subj=system_u:system_r:systemd_networkd_t:s0 key=(null) > > Signed-off-by: Dave Sugar > --- > policy/modules/system/systemd.te | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te > index 64e36c66..cd88e621 100644 > --- a/policy/modules/system/systemd.te > +++ b/policy/modules/system/systemd.te > @@ -651,6 +651,8 @@ corecmd_bin_entry_type(systemd_networkd_t) > corecmd_exec_bin(systemd_networkd_t) > > corenet_rw_tun_tap_dev(systemd_networkd_t) > +corenet_udp_bind_dhcpc_port(systemd_networkd_t) > +corenet_udp_bind_generic_node(systemd_networkd_t) > > dev_read_urand(systemd_networkd_t) > dev_read_sysfs(systemd_networkd_t) Merged. -- Chris PeBenito