Received: by 10.223.185.116 with SMTP id b49csp1105446wrg; Tue, 20 Feb 2018 13:26:41 -0800 (PST) X-Google-Smtp-Source: AH8x225zCRCbZUgf/X825wvQAId3ITRmXK7Gybe+R+8/6T0M3eRPxexV7dbL9KGakNliCkgjyigS X-Received: by 2002:a17:902:57c7:: with SMTP id g7-v6mr872353plj.381.1519162001417; Tue, 20 Feb 2018 13:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519162001; cv=none; d=google.com; s=arc-20160816; b=vk7bUaCzvQRZwewN0sJXy+KHMy1qsb3D3KXajQ8H6vl55EMML35Tx471+f3PGX8aie YXxrIv58EL0WgRUpox0/jwcyS0huA398XVJHUAF9XkS+FKrmkdFARvxy1fjOqRbsjHO3 F9kLpAHxHU93/81Lwpzs8T+jqm7VCgeplYl3PP4l08AZncS/jnOVLgB2kGuvSypSZ8lU ZLtADUneJ1eYoIQkbLOJDSbUUV+eNtX5RyCOYizUCzbhz6nhml7QRA5Y0ArSbuELR2Pd 85zxWH825p51zaJ+UBmdJLjUkfsBW/BIny58ffBsnwLAYE6NFht6evR/dCpqaeorgDjN XV/w== 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:dmarc-filter:arc-authentication-results; bh=QZRfL8FkAcw91JbB7XhrR+Qp38JSYns19uKUSJqQWMA=; b=oC7n3pwCz9WegjVzj7OswA89W+RLu+gzPrcvNgnPEu4ILdNPmnsSCEOY8GSojRdLDA 3RsICgHgv3uL+O/7ndTpGrY8hIyWiIABMZiStA2NOL9wri6fytQdPZ6490Ti6fH6yQad 5alo/vJHzKuFL8mvZXHOvl6UrQEfu6SMF4gnzg7oImlgcMmtijjRc6gykEd3pphrjlVs lq3A56e0ewSiaZbp3xaoSMJGlEcN07fXB3RchT+nXVMHz1fpP47cWZwkzTQWve/GXXjJ ooQxs6JZIQftOuBLYL7dUaZLraMMzOuAxuYlu4s8MbEruXAOFZdMSHgxBdSSbLQvTuCR g6bQ== ARC-Authentication-Results: i=1; mx.google.com; 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 m18si195780pgu.633.2018.02.20.13.26.19; Tue, 20 Feb 2018 13:26:41 -0800 (PST) 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; 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 S1751497AbeBTVYG (ORCPT + 99 others); Tue, 20 Feb 2018 16:24:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:49336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbeBTVYF (ORCPT ); Tue, 20 Feb 2018 16:24:05 -0500 Received: from redbean (ip5f5adea9.dynamic.kabel-deutschland.de [95.90.222.169]) (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 9A8C82177B; Tue, 20 Feb 2018 21:24:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A8C82177B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jeyu@kernel.org Date: Tue, 20 Feb 2018 22:23:59 +0100 From: Jessica Yu To: Matthew Garrett Cc: Ben Hutchings , Rusty Russell , Linux Kernel Mailing List Subject: Re: [PATCH] Make kernel taint on invalid module signatures configurable Message-ID: <20180220212357.wts5c5c7uqcfguzu@redbean> References: <20170807195027.13192-1-mjg59@google.com> <20180215152514.rxmh7webdg2i2fct@redbean> <20180220192100.wlrn3c4hnqdmu4zg@redbean> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux redbean 4.14.16-200.fc26.x86_64 x86_64 User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Matthew Garrett [20/02/18 20:37 +0000]: >On Tue, Feb 20, 2018 at 11:21 AM Jessica Yu wrote: > >> Ah, OK. So if I'm understanding correctly, you want to use the same kernel >> image/configuration but for two different use cases, one where the module >> signatures do not matter, and one where they do matter. But the config you >> want to use in both use cases would have CONFIG_MODULE_SIG=y and >> CONFIG_MODULE_SIG_TAINT=n (to avoid tainting of unsigned/invalidly signed >> modules). > >Right. Distributions generally have to try to satisfy multiple use cases >with as few kernel images as possible. > >> In any case, I think I'd be willing to merge it as a module_param made >> available under CONFIG_MODULE_SIG=y (rather than as a new separate config >> option), while preserving the default behavior of tainting on >> unsigned/invalidly signed module loads (so let's keep the param parts of >> your patch). I think it makes sense to consider the turning-off-the-taint >> param as a behavioral tweak under CONFIG_MODULE_SIG. Then you could turn >> off the tainting behavior on the kernel command line, would this >sufficient >> enough for your use cases? > >I think that's probably not practical - distributions often aren't in >control of the kernel command line after initial installation, so they'd >end up with different behaviour depending on whether a machine was a clean >install or not (which is why several things that are module_params have >defaults controlled by additional kernel config options) Ah I see.. Fair enough! >> >Not entirely. There's two cases where the current situation causes >problems: >> > >> >1) Distributions that build out of tree kernel modules and don't have >> >infrastructure to sign them will end up with kernel taint. That's >something >> >that can be resolved by implementing that infrastructure. >> >2) End-users who build out of tree kernel modules will end up with kernel >> >taint and will file bugs. This cannot be fixed but will increase >> >distribution load anyway. > >> I thought these two cases (particularly #2) were the very situations >> where distros might find the unsigned module taint useful (especially >> in the use case where you do benefit from module signatures). From my >> understanding, the unsigned module taint is intended to be useful when >> looking at crashes/OOPses, to provide a clear indication of whether or >> not a developer could reliably debug the crash, or choose to tread >> carefully, because the end-user has loaded an unsigned/out-of-tree >> module that wasn't signed/shipped by the distribution. Is the taint >> just not useful to distros in this manner anymore? > >The module list is usually sufficient for that - users tend not to replace >individual distribution modules without rebuilding their entire kernel.