Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4795596img; Tue, 26 Mar 2019 17:32:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJEUPCBexGMaRxWY5DpORsfmcd3ikdVR0HQtwG/FX4zrr+0TxEhWCMZwZmDYABeG7FAEQU X-Received: by 2002:a63:e051:: with SMTP id n17mr31298845pgj.19.1553646729444; Tue, 26 Mar 2019 17:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553646729; cv=none; d=google.com; s=arc-20160816; b=cgvjwFOMTNotuEHqTsGJLsMom4KkHrrPhww/sMDCJ4KxOzlB4UfKZMgJuKYED1ZYg/ aieb3Gmpe4EDsCQ8QOABNVXrybuskRnOFC6Uw9CurRw1KMb4T0E31y/jxYZRKC1iz7UH 8KLCYAIkyzFA3NEaidA/LHtzGTDS5yypFHr1QNFRnA78QH0qI7+Bh5Lb8VM0+7T+gRr7 Ia1DJnAwzRpT1HwE/t9Sjuu1e+ZpBpNoW2DHu6yNBxuaeS8rU0sqeoYpiQWMP72G73zq oH/HdKy8ClHsskkHprAmwfJstHG6U9M0SH0d2dwaMh36mqvLbaAvOjAGCdkZh9HG6bVz ukTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KaBSzXtbRUPhw2wGHgAnZc9LhA6OTOrQbETJZeLCMc8=; b=gBxk7ovkyUWAN6MZkhOCeljJ5/EZ/fWEpyZCvvdLx+xezZ3f+PVRWSdM7DDstBh973 HE5ir4eeA1+t5CudaoUzYmsXzwc8wYcFF3GX2AEMOnLyB2ydu/U2ATsFsFaEFKfsS1DA LaN9IibYk3o6sseqvxUM3eO9iVWOwSqxr8FBCoxlheAtNuh711WVXcuYgYb+PqJ9om/S YJS+WsfB5qyQhgV4o+5Yyaa3suLPAGf8nILbkx2mkFsBcGufsga6Rig/PQ7L9bGLZZWs U1Irk3G+tmrUz1nm5NuaXpkgHbyURWFL6OFE8wGyhq3GBItwYsYsOYSgOghjVziYYtY+ Umqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bu6t7+m+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si4782277pga.257.2019.03.26.17.31.52; Tue, 26 Mar 2019 17:32:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bu6t7+m+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732170AbfC0AbD (ORCPT + 99 others); Tue, 26 Mar 2019 20:31:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:37576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726922AbfC0AbD (ORCPT ); Tue, 26 Mar 2019 20:31:03 -0400 Received: from localhost (mobile-166-137-177-030.mycingular.net [166.137.177.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2AB862075E; Wed, 27 Mar 2019 00:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553646662; bh=lvbpiVadMMGfp841TVRoGE3PHgwepkXr5pCRZmPS6ro=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bu6t7+m+h5MEb7AX2zRKWB5DFDFG8S75IbkFD+cC6PJ8y1OTZphAI83I/nr3NXcUq SIh8nwFEJEiVwiwrmgzz485/1tXwCJfmN0ng1qSHx9u3ZMBSUV52nYdT4omvD2MCX2 Hb9BvCm8BvWUvh8mHeYEk0Nvr8XNmGNAeJs9H3AM= Date: Wed, 27 Mar 2019 09:30:57 +0900 From: Greg KH To: Andy Lutomirski Cc: Matthew Garrett , James Morris , LSM List , LKML , David Howells , Linux API , Matthew Garrett Subject: Re: [PATCH V31 25/25] debugfs: Disable open() when kernel is locked down Message-ID: <20190327003057.GA27311@kroah.com> References: <20190326182742.16950-1-matthewgarrett@google.com> <20190326182742.16950-26-matthewgarrett@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 12:20:24PM -0700, Andy Lutomirski wrote: > On Tue, Mar 26, 2019 at 11:28 AM Matthew Garrett > wrote: > > > > From: Matthew Garrett > > > > debugfs has not been meaningfully audited in terms of ensuring that > > userland cannot trample over the kernel. At Greg's request, disable > > access to it entirely when the kernel is locked down. This is done at > > open() time rather than init time as the kernel lockdown status may be > > made stricter at runtime. > > Ugh. Some of those files are very useful. Could this perhaps still > allow O_RDONLY if we're in INTEGRITY mode? Useful for what? Debugging, sure, but for "normal operation", no kernel functionality should ever require debugfs. If it does, that's a bug and should be fixed. thanks, greg k-h