Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4929512pxj; Wed, 9 Jun 2021 05:30:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwErm7SrUko4RD6yOvELN98w2GU3g9k1xNr4Ts6aGk3syTzFIXAPhyws6GL9hKuKmg3AM6S X-Received: by 2002:a17:907:1c20:: with SMTP id nc32mr28017866ejc.21.1623241829342; Wed, 09 Jun 2021 05:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623241829; cv=none; d=google.com; s=arc-20160816; b=Hh4i9hLgja2OJb9SNhmcfl5/2jmzrkFCBLa3DnJgoTG0fmAOqWC9D1Jtel0Fzh9Trc yfkptP+96+M2Zs2PKsxN3SBEvCg3+eIz3yPbnRq13d1Qp4nyevHPwIdzH1M6z9JJomVP fnN5XKaciCKYvtbxpBckrHjZDedm9rIY1oUQNdTwSU3lkiniqkREqnsODwMnSEjl6sIl bTKYdX/Z7rtoqpDq0BDfBMD+HhbhhVmrKCF8/k1p/xzSPotoygwqAOU5uJxuQfb3IaVQ 3meM1A/kqEdNw1Tq8dHq1nSI9qQRNtM//nNZ4f6wIXAc2ma7ScG3iwSkT6VmIYghuK/O ylmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=p+D0KtrR3ySKv9LEuftUeYWRIhXsDsdXtnrq6QYaDHk=; b=IRMiXZcD1W3G6g2sAmmBZwe1i10xLXkdEOibyR8Di0WarAeiRLPAfAqMDE6AHolPwQ 9g+Yd5GhnohzioXBm1Glb12l7RGvgVQVPmQUlr5sOXdNKWmIYFMH9cxCnvKH83otNQOp mkV0+7+7iOV7m5+l023uzohDlNvGMPR/Cei8/ZEYwbt114wAXrNQYsL35AoKXl1RRAxq PM4vwrsUrS0C0ax98ZkH2/L+SJc0K2Ha5wp+nIyGO1x8Xy2+ITbf63VE1E3W7PfzSgiq aHwJXI6QQLnUDAzO4jHQOGdpFblXaJUKNkOpp7uk1rIldjteUyXVya7Ra4Vwfka1GDbW iUpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=syy+MK4m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 r13si2266469eds.77.2021.06.09.05.30.06; Wed, 09 Jun 2021 05:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=syy+MK4m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235398AbhFICni (ORCPT + 99 others); Tue, 8 Jun 2021 22:43:38 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:44962 "EHLO mail-ed1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231668AbhFICnh (ORCPT ); Tue, 8 Jun 2021 22:43:37 -0400 Received: by mail-ed1-f49.google.com with SMTP id u24so26876366edy.11 for ; Tue, 08 Jun 2021 19:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p+D0KtrR3ySKv9LEuftUeYWRIhXsDsdXtnrq6QYaDHk=; b=syy+MK4mAE5Ta3E44ycW61wKy+jm9LP5Fc8EsQgZPGGAsTggdfkkW77kT5EhJwXDKl I+XPhfw/dXEghiCZs+YwRrNu+QpDXlaSfO/oKAb3I25xjfc8AB1U4a1ug6DK5nq6fYyd z9Ahfz+gjJW/7LpiY87jTM3q+tmyvsVG2oHfqF/LMJWBYmBstCFvwwO3/CP2by6a4IoJ sYhO8Ck/O8z3eqgK6CIN/U8YILwblIfkNFy6M7Q/dd80PdTlxn/YDmRgNboQf0VetYHO CGv/VWscu7/9Z3LqyQEyL2oBD8RrzzNvbEnOuZ+GEyqpWIc0GYBpGEuy4OTtiwh7w7tj FGBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p+D0KtrR3ySKv9LEuftUeYWRIhXsDsdXtnrq6QYaDHk=; b=tdTPpkkHdNSs+asalIMZ8LOTxG87w/NIjdCnxndd5DV/RA20irK3x29xzHrB9Q4TMO W3JT4yCVSJOM6YVm85TEtlOXxdTCd7iCSequxrpVM7Djysdkt3sPqGVMkLN5AlmuyR8k e7S+z/mb0e+O3vyWtnMBjMrVd/0MWfYlfWO/Iu7x/hrRlK1eM3Xc/r8Mnr0D1a2Gty8u BoR00BhVKJaJ2XrZT07BhZFgMNZaOSYxA/cjnNVPF/auj4rF1D87dWcwxxxU1PyQuVZY 7eq2Xwtp3kwalivoLlSLI/8UBm2bn1vEvNr771iE2++p/t5ms+3UJHhAaa1EgHsv8nNx 6pIw== X-Gm-Message-State: AOAM533SKPN+hI7CJzV/yns7hjVJBeLriKrHQR7RW0FG1MnPkdH6MHFZ eCqqxGphOaapIURjBtGPIXvSvMbNipTXXfK2qEBs X-Received: by 2002:a05:6402:348f:: with SMTP id v15mr16610509edc.135.1623206426948; Tue, 08 Jun 2021 19:40:26 -0700 (PDT) MIME-Version: 1.0 References: <20210517092006.803332-1-omosnace@redhat.com> In-Reply-To: From: Paul Moore Date: Tue, 8 Jun 2021 22:40:15 -0400 Message-ID: Subject: Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks To: Ondrej Mosnacek Cc: Linux Security Module list , James Morris , Steven Rostedt , Ingo Molnar , Stephen Smalley , SElinux list , linuxppc-dev@lists.ozlabs.org, Linux FS Devel , bpf , network dev , Linux kernel mailing list , Casey Schaufler , Michael Ellerman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 8, 2021 at 7:02 AM Ondrej Mosnacek wrote: > On Thu, Jun 3, 2021 at 7:46 PM Paul Moore wrote: ... > > It sounds an awful lot like the lockdown hook is in the wrong spot. > > It sounds like it would be a lot better to relocate the hook than > > remove it. > > I don't see how you would solve this by moving the hook. Where do you > want to relocate it? Wherever it makes sense. Based on your comments it really sounded like the hook was in a bad spot and since your approach in a lot of this had been to remove or disable hooks I wanted to make sure that relocating the hook was something you had considered. Thankfully it sounds like you have considered moving the hook - that's good. > The main obstacle is that the message containing > the SA dump is sent to consumers via a simple netlink broadcast, which > doesn't provide a facility to redact the SA secret on a per-consumer > basis. I can't see any way to make the checks meaningful for SELinux > without a major overhaul of the broadcast logic. Fair enough. -- paul moore www.paul-moore.com