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=-0.8 required=3.0 tests=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 116DFC47404 for ; Fri, 11 Oct 2019 21:52:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEFB22084C for ; Fri, 11 Oct 2019 21:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728735AbfJKVwn (ORCPT ); Fri, 11 Oct 2019 17:52:43 -0400 Received: from albireo.enyo.de ([37.24.231.21]:45014 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728719AbfJKVwn (ORCPT ); Fri, 11 Oct 2019 17:52:43 -0400 X-Greylist: delayed 376 seconds by postgrey-1.27 at vger.kernel.org; Fri, 11 Oct 2019 17:52:42 EDT Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1iJ2js-0005ne-Ji; Fri, 11 Oct 2019 21:46:20 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1iJ2js-0002M3-Fz; Fri, 11 Oct 2019 23:46:20 +0200 From: Florian Weimer To: Steven Rostedt Cc: Linus Torvalds , LKML , Matthew Garrett , James Morris James Morris , LSM List , Linux API , Ben Hutchings , Al Viro Subject: Re: [PATCH] tracefs: Do not allocate and free proxy_ops for lockdown References: <20191011135458.7399da44@gandalf.local.home> <20191011143610.21bcd9c0@gandalf.local.home> Date: Fri, 11 Oct 2019 23:46:20 +0200 In-Reply-To: <20191011143610.21bcd9c0@gandalf.local.home> (Steven Rostedt's message of "Fri, 11 Oct 2019 14:36:10 -0400") Message-ID: <87tv8f9cr7.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: * Steven Rostedt: > Once locked down is set, can it ever be undone without rebooting? I think this is the original intent with such patches, yes. But then reality interferes and people add some escape hatch, so that it's possible again to load arbitrary kernel modules. And for servers, you can't have a meaningful physical presence check, so you end up with a lot of complexity for something that offers absolutely zero gains in security. The other practical issue is that general-purpose Linux distributions cannot prevent kernel downgrades, so even if there's a cryptographically signed chain from the firmware to the kernel, you can boot last year's kernel, use a root-to-ring-0 exploit to disable its particular implementation of lockdown, and then kexec the real kernel with lockdown disabled. I'm sure that kernel lockdown has applications somewhere, but for general-purpose distributions (who usually want to support third-party kernel modules), it's an endless source of problems that wouldn't exist without it.