From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 CD063C43381 for ; Thu, 28 Jan 2021 14:09:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8078F64DEA for ; Thu, 28 Jan 2021 14:09:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbhA1OJn (ORCPT ); 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