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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 5C2C3C48BCF for ; Wed, 9 Jun 2021 02:41:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 40E0B610A2 for ; Wed, 9 Jun 2021 02:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235400AbhFICnk (ORCPT ); Tue, 8 Jun 2021 22:43:40 -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-Google-Smtp-Source: ABdhPJwft6pcgB0QhLBi7pt1iV0pHMufLyRKQEjEH8t6ci5z3HEcu7wmJlWNIAy6UnuWowq/YZCxYIxjO4ZEPjn7Lg0= 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