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.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C36A8C433E0 for ; Mon, 15 Jun 2020 13:52:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90780207DA for ; Mon, 15 Jun 2020 13:52:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="PQFj40ec" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729766AbgFONwr (ORCPT ); Mon, 15 Jun 2020 09:52:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728326AbgFONwq (ORCPT ); Mon, 15 Jun 2020 09:52:46 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B392C061A0E for ; Mon, 15 Jun 2020 06:52:46 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id 205so15742645qkg.3 for ; Mon, 15 Jun 2020 06:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=bDeRJNblU69ATwoeiOxp1oyvWn3m3/GlTarALvwEFNE=; b=PQFj40ecwD7G47UQIRgOYuSCpFWlPaf1uv+dDEgKJTzjMd+Mrwb0azdNb1oZ3i0NeU dzNcWfBoQLO+ut4BjA22Fl1tTOEVFI6AjQAjA/IoTekkXbOQkLBcUr+Ws7vkJ3EamP5i fk6d7tLnGhCncayhfnKsFfo12OxqymXoyPOLo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bDeRJNblU69ATwoeiOxp1oyvWn3m3/GlTarALvwEFNE=; b=OML9MO38IMHOooAyRYZG7+qNFZ/FcVPD2v8AFTGf2OZ507SpkuR+nryO4qBmZxRn7r vbITi2UhWaSoLH7KTkZemdTE1ptrFYbxJL6ufUmAb1lm3m/uIiZLL8D23Xr9qx1RV/+r n9rp7EU8GYRRNUFWNd5BKU8fDvkiAuphYA1zQz290QWFuz+9Tq4OJSC1Holbq6B2/DDJ 1X8aHbDQIs8j3LqRRbtQT/bjesUzsBoDvPJRr7HKP/jG9Sr8V3hHC5yeVi9ZBESZ+T4L RedCyKCDRjlK2lrzbpJT6gtdNExO7+Ijl/EiRUQsSMoRf3OHMM0W0yaQBxayDEAxBNcS qVrA== X-Gm-Message-State: AOAM533Tx/ouE9gPJml6oSSasL/vnNzd7IRRlacFP9bHfm2IZUffmOIs W7NMrjsHldhEhIL3b/bC7y6/0pkdmao= X-Google-Smtp-Source: ABdhPJzyHAo8SelzYvNg7kra+RH4dgfozkpKIln4GueKAPjb6EjJAxxzUnYJm0731yX/6j906VfyRw== X-Received: by 2002:a05:620a:b03:: with SMTP id t3mr16059418qkg.317.1592229165288; Mon, 15 Jun 2020 06:52:45 -0700 (PDT) Received: from fedora.pebenito.net (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id i3sm10782594qkf.39.2020.06.15.06.52.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2020 06:52:44 -0700 (PDT) Subject: Re: Are we on the wrong track? To: Russell Coker Cc: selinux-refpolicy@vger.kernel.org References: <3243717.6S2XvbbdUs@liv> <578d7c7c-cb41-b224-2758-144aa9b5c1ad@ieee.org> <2469682.qIgoumM3a6@liv> From: Chris PeBenito Message-ID: <9fb12224-d7d7-3156-e25b-2bf4c37266b5@ieee.org> Date: Mon, 15 Jun 2020 09:52:43 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <2469682.qIgoumM3a6@liv> 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 6/12/20 9:02 AM, Russell Coker wrote: > On Friday, 12 June 2020 10:52:56 PM AEST Chris PeBenito wrote: >>> In recent policy we have 6 different domains for systemd-generators. What >>> benefit are we expecting to get from this? Are we anticipating that one >>> generator will attack another? How would having separate domains for >>> generators do any good when there's no restriction on the contents of the >>> files they generate and nothing to prevent one generator from creating a >>> file of the name that another generator is expected to create? Is it >>> even reasonable to expect that a program that can create a systemd unit >>> file with arbitrary content (IE being able to start any daemon with >>> arbitrary configuration and command-line parameters) would be unable to >>> exploit that for unrestricted root access? >> >> I find this a valid criticism and reason enough to at least collapse them >> into a single domain. The original intent was to constrain the special >> access they use, but you are correct, a compromised generator could do >> mostly do all the bad things anyway since it can write unit files. > > OK, I'll submit a patch for that. There were a few pending PRs that were put on hold or dropped for this change of direction, so I've posted the change: https://github.com/SELinuxProject/refpolicy/pull/276 -- Chris PeBenito