Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4871835img; Tue, 26 Mar 2019 19:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvVfZTXZBQkZ+GutDpQ4O/pOBPWdLQ9zH+8r2pr2zGkVeDSKlGeQa0/VdzsZgcdWiIiUYx X-Received: by 2002:a62:bd0d:: with SMTP id a13mr536005pff.242.1553654184202; Tue, 26 Mar 2019 19:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553654184; cv=none; d=google.com; s=arc-20160816; b=ocOgMYNapvpHrPzF+ClAUUVm1B6gE4pHVG6UJJK4lNk1VGaYvRrYZ1Ag7UyfJBslmd jawRPhsq0drjUDLn2EwJXVS68dhJhXoEzviY2wuXGRdNeVP0OrM7WWt6Atw7iKEZfPvX 9ZepauP13CC6kSGW4/KgF6JZJF6dbxqqWXYj79FFGA17vm8wqG4d0o2bMIjtJsm4DR/H Pz8ct83lHUkkHuTZ0yIyH9gfHUUDEU2LxequiUFqMxtOhE/UpPkLAXww9b5N022dsaCe 4lwAlYFrkw112sIcGyVZBVqZzOTqUjVdifb7PTnDbWgwqK06LXGVJL7NVDKcXkPu6Joz gK4g== 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=VuB7ldGwdyS9J2mB/DPs0kTjz5I863M9SWiOuCgpbuw=; b=zeBVV2WElKTQmyx5o3prCJdfu6LvP0DxRYDtrgke7ILYi74o8ztP0DcGcXRgCdb6OU gWEOPIsMpsy4bQ27J/bUJ0/srMhKe+X61DBewizU2USOlIqOydBSeNG+oXId1Xao4gIC R/WC0X0/IleIv8alAJZ9HDYlitfdE0PcyDlZuPsXrnP+59eJBs3ueUDJgM2WeIdlJXaS rvRs09FULv6ZhQ4YKYoknwTEhWWlVjykacn8jBVtoTEreHfTSpt1FjLDTYTIe0YzSVbv 1vwxvQG5LbM6xpaOWlczoncTm3mIWulQcQNjwBhrLP+DWYYb+eB3jt2tq7WkBDhxsr5Z 5q9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=A8rKYcu8; 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 x206si15930949pgx.37.2019.03.26.19.36.09; Tue, 26 Mar 2019 19:36:24 -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=A8rKYcu8; 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 S1732815AbfC0Cf0 (ORCPT + 99 others); Tue, 26 Mar 2019 22:35:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:41590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732018AbfC0Cf0 (ORCPT ); Tue, 26 Mar 2019 22:35:26 -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 869A020811; Wed, 27 Mar 2019 02:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553654125; bh=1r3fdl+UtL2+YxlwOVs9Pnn+Om8fHtKWrWnR5n6i8Ds=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A8rKYcu8z5ztGRzeH31XPPvIXlUtRYHdYRcG4JhblIKYOWQmD5z9p+5SUhky3CCcg ZuQRrySzsDDTPKgzEyItqwRL05RYP271xgxnDUxB9Pmh+uqFTYcQjf8BcCPMPOMzaz kemnsoImSqzSidRr9Bb5WOUIRLaokobu69gnHiPs= Date: Wed, 27 Mar 2019 11:35:20 +0900 From: Greg KH To: Matthew Garrett Cc: James Morris , LSM List , Linux Kernel Mailing List , David Howells , Linux API , Andy Lutomirski Subject: Re: [PATCH V31 25/25] debugfs: Disable open() when kernel is locked down Message-ID: <20190327023520.GA20766@kroah.com> References: <20190326182742.16950-1-matthewgarrett@google.com> <20190326182742.16950-26-matthewgarrett@google.com> <20190327003130.GB27311@kroah.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 07:06:36PM -0700, Matthew Garrett wrote: > On Tue, Mar 26, 2019 at 5:31 PM Greg KH wrote: > > On Tue, Mar 26, 2019 at 11:27:41AM -0700, 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. > > (snip) > > > Why allow all this, why not just abort the registering of the filesystem > > with the vfs core so it can't even be mounted? > > As mentioned in the commit message, because the lockdown state can be > made stricter at runtime - blocking at mount time would be > inconsistent if the machine is locked down afterwards. We could > potentially assert that it's the admin's responsibility to ensure that > debugfs isn't mounted at the point of policy being made stricter? Ugh, I can not read, sorry, neverind. The patch is fine as-is. greg k-h