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=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 DC5E6C433B4 for ; Fri, 7 May 2021 12:03:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B89EE61463 for ; Fri, 7 May 2021 12:03:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235823AbhEGMEK (ORCPT ); Fri, 7 May 2021 08:04:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:55230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235577AbhEGMEH (ORCPT ); Fri, 7 May 2021 08:04:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D6E7660FE8; Fri, 7 May 2021 12:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620388987; bh=vudGHCGXetE5aXwQ1nvuEbeCdB1EcOBpJ+WbalwKr6Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A1kxSE+n+RPqY9HaUyaCLME/1H6AiR00wQeXArApF/6K9b1ty5scQoL0tm38QJbgE 7rgl6lXRdZZbGduFPT9DHC72Y2aJf/ly6jQ+MdRHtYDbQB5/cRkJkpOX3ZVDhoJJiB Fio5Q6QnzNfT/HCUFVGkfnChrpB/vbsTrsUiWWqU= Date: Fri, 7 May 2021 14:03:04 +0200 From: Greg Kroah-Hartman To: Ondrej Mosnacek Cc: "Rafael J. Wysocki" , selinux@vger.kernel.org, linux-security-module@vger.kernel.org, James Morris , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] debugfs: fix security_locked_down() call for SELinux Message-ID: References: <20210507114150.139102-1-omosnace@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210507114150.139102-1-omosnace@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 07, 2021 at 01:41:50PM +0200, Ondrej Mosnacek wrote: > Make sure that security_locked_down() is checked last so that a bogus > denial is not reported by SELinux when (ia->ia_valid & (ATTR_MODE | > ATTR_UID | ATTR_GID)) is zero. Why would this be "bogus"? > Note: this was introduced by commit 5496197f9b08 ("debugfs: Restrict > debugfs when the kernel is locked down"), but it didn't matter at that > time, as the SELinux support came in later. > > Fixes: 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") What does this "fix"? What is happening in selinux that it can not handle this sequence now? That commit showed up a long time ago, this feels "odd"... thanks, greg k-h