Received: by 10.223.185.116 with SMTP id b49csp1065657wrg; Tue, 20 Feb 2018 12:38:52 -0800 (PST) X-Google-Smtp-Source: AH8x226Fu4rjQXtq3Iwi4oniCCxNrJIaKVRjC3LCYyp+/Q1SnSgu3pRZid73fFWaTK3X7sGY4WnI X-Received: by 2002:a17:902:7d17:: with SMTP id z23-v6mr755328pll.427.1519159132707; Tue, 20 Feb 2018 12:38:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519159132; cv=none; d=google.com; s=arc-20160816; b=ja30Ll10gnFawRfyz9GrYInw3U1tc/gl37bPFIECSq+eOp+GK7X/z68xsqqltUBv9+ TVWcS6WwIvfRxFNE9+cEWfnPeVq1/E+FhNsBOcHDMWO8VCmqfO7e2J385PC94+sm3jwW ae8jCS+TmRXOoNwPD0AuvSsY69COjGdmQ2FndE+V25WoF0qB5tEWhCxc9Erf8w8kDMIK u91GOWa1CNPvCPNX45momUWiPibDTXQ5rscEIMht9cRMM204GpmH48y695+xQAz3PWEk S1NQOIk3T7AgvUkkBCkKMuRin/a42tGg5KGy1PimSvhrXjawxqijYpo9LBt75e4p86qS WhsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=/f+fVoquD9F60OL8+rnwbQH5g+XYn86C92/3QaXMaOA=; b=uVjPAdER3FbhfUcbVKbn26lmTTVfCaliBMaQ5n19s7z5mtCUUNXjtlnUCQrV8YpZyN AFwJanukNvfHDsLV0a5LypJiFMmnYXIU4RZHDV1gCD3UrSQ+f3kg3o5GWek8osfprqmL lsZR1EmdQhwzfZ4xwdmCz6hD1TxyHsZHE735RF+QBAZ5fQOaGCMd6CickYfBX4kPVWp7 kfyhXVNhMZw3zhesQAeqk6X7GjZHeG1DsTR1jWsV58vo0ouJvnd1reMgBFwA4riGWuCQ +dYs2KvYncXLPUp9QnxgOnQ8aF99cQXzQ3SE743ehk74RTmz+2L2o2N1CmHeCaPrLQiN CAtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XH5ONxUS; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y92-v6si8062415plb.137.2018.02.20.12.38.38; Tue, 20 Feb 2018 12:38:52 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=XH5ONxUS; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751449AbeBTUhr (ORCPT + 99 others); Tue, 20 Feb 2018 15:37:47 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:35873 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbeBTUhq (ORCPT ); Tue, 20 Feb 2018 15:37:46 -0500 Received: by mail-io0-f193.google.com with SMTP id t22so16386112iob.3 for ; Tue, 20 Feb 2018 12:37:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/f+fVoquD9F60OL8+rnwbQH5g+XYn86C92/3QaXMaOA=; b=XH5ONxUSwfolWrsMF5p4tyFeY1zf6KxyDoNF/hnsGEgN9ooP7X4sA0Ko4cnYgDqZtQ pn4XTxf6vbTUcssizu6wku2spCAiqOVWvqQD6AwiLfro7z+JIvGq3RZ6mARp4E1sgVrY +mvIwO8rn8jwtfyeGhi8DImvUxfCcQXoZXS4bCV4ejtszHsw1b3gErgxMrL8RTKUCkkM TySNG23ymw5UD/2QZ/6KxOz71JQwYq0JE7kBPehuHc2x5klDVc9k9amEIai52jQVwKKk CTx0CTli+W5K8XVgyPUWJ0nRCRGi6XtjmMEApvhfc9kAvBpW6M5+8Hx91YE8bavksQ8n bPug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/f+fVoquD9F60OL8+rnwbQH5g+XYn86C92/3QaXMaOA=; b=TrOOaGqblGC164NmOgAav4xC5q7U8ftAQjQEnEkJvziqG0uHaKJK+SWhZt2zUsAXsF vSsrG6Ih5DQhIIn0VIRepLConK6sLaGyHAV5CzbAmeyoVn4Ch3C0VTuDd80lZYXQI07d 7ZN1YOEiIXSfaLtPkDEvu5o2O+mJkeMNUBvBulngRsb1I8X4C7ErACX8GaKMFABq9QRb DDVz6VYDvmAWwZh0zFVjHbXmK77SifLeXV274eFSXXAfHEHC/ked5X9naxnf7T/aG77g /8iR9Dmee4lmgwSTTS6p+JEU4RwhVrbS1OoiogOj/25pas3ZKcNooJEzgTmRVDlUVlvj iYfQ== X-Gm-Message-State: APf1xPAB6gHlt0yrVGCXEnKVyl/FHWyMTY5ovDAhokeMyRZh1WSlDW0C vj1OH74Xbz9+hYEnEXgCOow8Lsl5yKh8pMX+r51spA== X-Received: by 10.107.14.143 with SMTP id 137mr1218783ioo.43.1519159064885; Tue, 20 Feb 2018 12:37:44 -0800 (PST) MIME-Version: 1.0 References: <20170807195027.13192-1-mjg59@google.com> <20180215152514.rxmh7webdg2i2fct@redbean> <20180220192100.wlrn3c4hnqdmu4zg@redbean> In-Reply-To: <20180220192100.wlrn3c4hnqdmu4zg@redbean> From: Matthew Garrett Date: Tue, 20 Feb 2018 20:37:34 +0000 Message-ID: Subject: Re: [PATCH] Make kernel taint on invalid module signatures configurable To: Jessica Yu Cc: Ben Hutchings , Rusty Russell , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > >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.