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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED 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 C27B5C282CE for ; Sat, 13 Apr 2019 15:40:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92456208E3 for ; Sat, 13 Apr 2019 15:40:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=coker.com.au header.i=@coker.com.au header.b="B/GBc4Dg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727309AbfDMPko (ORCPT ); Sat, 13 Apr 2019 11:40:44 -0400 Received: from smtp.sws.net.au ([46.4.88.250]:49920 "EHLO smtp.sws.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbfDMPkn (ORCPT ); Sat, 13 Apr 2019 11:40:43 -0400 Received: from xev.coker.com.au (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id C1C2FECF1; Sun, 14 Apr 2019 01:40:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=coker.com.au; s=2008; t=1555170042; bh=1zQfCWcf7l7ecrqL3J+FZesU5yP2xR0jaTuTc/6o+2I=; l=1328; h=From:To:Reply-To:Cc:Subject:Date:In-Reply-To:References:From; b=B/GBc4Dg6cJHw8d2hRmvSQK06ZpNgImykqK1MW/xUCMfboeYotSnQ8fDJMDOShtp5 bw8ma1zmLzbnPb6mJqpVvZj7LuDxjIHEL88ZtMb9q8P7VkcQ5lgsu+dOJ82v3AWL12 D+NlN2+Q346H5571M+8lLpPQ7BibwWQRDEL6RKlg= Received: by xev.coker.com.au (Postfix, from userid 1001) id 2755DD0F6C2; Sun, 14 Apr 2019 01:40:37 +1000 (AEST) From: Russell Coker To: "Sugar, David" Reply-To: russell@coker.com.au Cc: Chris PeBenito , "selinux-refpolicy@vger.kernel.org" Subject: Re: [PATCH] Add kernel_dgram_send() into logging_send_syslog_msg() Date: Sun, 14 Apr 2019 01:40:36 +1000 Message-ID: <5853619.lIKEncWOjy@xev> In-Reply-To: <52d3b5f4-532d-ab8c-3941-47817d0b3489@tresys.com> References: <20190409150948.10882-1-dsugar@tresys.com> <1987619.JXgbzmF0Gi@xev> <52d3b5f4-532d-ab8c-3941-47817d0b3489@tresys.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On Sunday, 14 April 2019 1:36:07 AM AEST Sugar, David wrote: > >>> Why is a socket that everything sends to labeled as kernel_t? > >> > >> Russell, you aren't seeing this type of access on Debian? > > > > > > > > > > ifdef(`init_systemd',` > > > > init_domain($1, $2) > > # this may be because of late labelling > > kernel_dgram_send($1) > > > > > > > > allow $1 init_t:unix_dgram_socket sendto; > > > > ') > > > > > > The above is in the upstream policy in the init_daemon_domain() > > interface. > > Not sure why. > > > > I've put in an auditallow rule and so far haven't been able to reproduce > > it. > > So we can probably remove that line. > > > > > Upstream RHEL is setting up the attribute 'syslog_client_type', has > 'typeattribute $1 syslog_client_type' in logging_send_syslog_msg () > > and then > ifdef(`hide_broken_symptoms',` > kernel_dgram_send(syslog_client_type) > ') > in logging.te Well they are stating that it's a symptom of brokenness... > When not allowing this access I get a RHEL system that will not boot. > I'm happy to put this in an 'ifdef distro_redhat'. Please let me know > the preference on how to proceed. Yes ifdef distro_redhat seems like a good idea. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/