Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1014342pxb; Thu, 28 Jan 2021 06:13:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNd5Ffkg6m341UL2FgVtjq0OiRXh5VTIg5tZ52v0++IzzWP0fFqmxf8RQD8Q6R2xohwTWQ X-Received: by 2002:aa7:c719:: with SMTP id i25mr14485919edq.197.1611843192957; Thu, 28 Jan 2021 06:13:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611843192; cv=none; d=google.com; s=arc-20160816; b=LnajoH1sgoODfiehTug9H3Xq+vbDL9ff4Rp+eVALoRzdDKT8Gk7/MRmyk6d8BFUtnA iEeRMtz5kZqdz1dpwOKLMQSu8UcoLKach6z4d3PhIViBTdBRdyo1knvKVCYNRKiGRiw6 RXmjYUGYJM69+LfJK5CCbBLS3VE/aw9Alop3iXlf3c8Zrdb66EVbfrP7AebHRlWbSkqL h0iJRXbTEpzVdgZewThM1tHfqGrEifIUs/0DDtIHo5gcX7tb0SD+PFcbJo0xcdExLaR4 g1ZFr/1Kilh+aqWXQ9n0uzEo/jsyFd2ZwFijpnSjkGKa9J1U7upwJyyZ9Xb1re7oW+TG fVWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature:dkim-filter; bh=81O1W5elTRD1pDroqJXETR2Qzd40SGUWmTKHgAnH+nc=; b=oof6LXgpJJKy6imUwbZp6nzLHFHdFIQSO4kLYfxAlDpWPKHdCEM226TDZy3nn1bwZn aiYydUuHINf0DIWwsPzv6+Z1LFnZPPI8o+4V7SMrQA5i04ObY8illEUxh2imGjTdJpVJ xMUBz9KyKWCFyPZ3dXbI3X3RDxFWddCx7EwrXK4Jvqj8XgBbu+U35d4XUvkMd9MHw68/ qgZcBhxr/dN+rqRAdhsOjEI0QZMkGspupnWQKW/vV4outwHCEpckbTX/Puf+Oh8iMulq j5NrcYlhgyNBp5DUPZ55d1xWYChSA5E5OYJNpDYMtUQE1GdOSwHUSUwncu+sKtIXyubE hFvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@defensec.nl header.s=default header.b="pIvPsm/H"; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si2587987eji.560.2021.01.28.06.13.06; Thu, 28 Jan 2021 06:13:12 -0800 (PST) Received-SPF: pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@defensec.nl header.s=default header.b="pIvPsm/H"; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbhA1OJn (ORCPT + 16 others); Thu, 28 Jan 2021 09:09:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbhA1OJm (ORCPT ); Thu, 28 Jan 2021 09:09:42 -0500 Received: from agnus.defensec.nl (agnus.defensec.nl [IPv6:2001:985:d55d::711]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 17B86C061573 for ; Thu, 28 Jan 2021 06:09:02 -0800 (PST) Received: from brutus (brutus.lan [IPv6:2001:985:d55d::438]) by agnus.defensec.nl (Postfix) with ESMTPSA id DA2FF2A1250; Thu, 28 Jan 2021 15:08:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 agnus.defensec.nl DA2FF2A1250 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=defensec.nl; s=default; t=1611842940; bh=81O1W5elTRD1pDroqJXETR2Qzd40SGUWmTKHgAnH+nc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=pIvPsm/HtPFib1CHTkhI9v+kdeBanY7ch3Irq8znnQR2pbOcAWXxzInjKBBSU/aax lknd/5cWjwW6+RiDELrroQwX7BuvMBocd+yV+sTLrMi6zP1qA7T27OQYdDoaGS70zm ShCwUcuCg1IOzTEFCbxzsx1qvhaOvk2RL3XAQH/I= From: Dominick Grift To: Russell Coker Cc: selinux-refpolicy@vger.kernel.org Subject: Re: sddm issue and patch not for inclusion References: <1944791.8TnJqL1ZiL@liv> Date: Thu, 28 Jan 2021 15:08:56 +0100 In-Reply-To: <1944791.8TnJqL1ZiL@liv> (Russell Coker's message of "Fri, 29 Jan 2021 01:00:26 +1100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org Russell Coker writes: > On Thursday, 28 January 2021 10:36:19 PM AEDT Dominick Grift wrote: >> >> In Debian/Unstable (which will soon be frozen and become the next stable >> >> release) the sddm X login program (the one that's generally recommended >> >> and specifically known to generally work well with SE Linux) uses PAM to >> >> start a session for the "greeter" (the program that asks for a password >> >> before a new session is started). >> >> >> >> With the policy currently in Debian that means the sddm user matches >> >> "__default__" and gets unconfined_u:unconfined_r:unconfined_t, not what >> >> is desirable for a program that takes input from unauthenticated users. >> >> >> >> role xdm_r; >> >> role xdm_r types xdm_t; >> >> allow system_r xdm_r; >> >> allow xdm_t xdm_tmpfs_t:file execmod; >> > >> > that looks like a bug or at least bad code > > That's a design decision. One could make a convincing argument that it's a > good decision. Not sure whether doing text-relocation on a file you created yourself is a good decision. From a security perspective does not seem like very good thing to along, The more because xdm is shared between various desktop managers. > >> >> corecmd_bin_entry_type(xdm_t) >> >> Also wondering what or which bin_t file or files this applies to and if >> it instead is not possible to give these a private type > > /usr/bin/sddm-greeter. Yes I can give it a private type, might be a good idea > in any case. -- gpg --locate-keys dominick.grift@defensec.nl Key fingerprint = FCD2 3660 5D6B 9D27 7FC6 E0FF DA7E 521F 10F6 4098 https://sks-keyservers.net/pks/lookup?op=get&search=0xDA7E521F10F64098 Dominick Grift