Received: by 10.223.185.116 with SMTP id b49csp3280821wrg; Mon, 5 Mar 2018 18:15:00 -0800 (PST) X-Google-Smtp-Source: AG47ELvhoko+5o+Di34vc40V4Cy6rpF12PDJ4z7+6IUWJCwmxtL56k771gSlv8xlSYjfPzTsqFAe X-Received: by 10.98.23.73 with SMTP id 70mr8540900pfx.169.1520302500277; Mon, 05 Mar 2018 18:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520302500; cv=none; d=google.com; s=arc-20160816; b=Hc48BG74tKk/qLmyAXR8F0GiTIRpwgY+9lmHi5PQd+iutjeTsDunYo9ill75Jmy9oB rFfdXFVf60ddWw4PVGPBX8pczxDl1UMd6Z0NKBtCdICXsxgxgxMEQkYEAhyAxZZ5Xoym dq8SbrCK8JMSZkN4GKfxEJYrL5AYzWPbSCJdOki4BAv3zdZMDwF1ZnVLa7NTJVXtVkU6 LttgULGE3sX8VuH+90MfOwOF4D65Yl23RZc6Diwxf7M9QwVyZ+MURO0jr6rjGsQ1g0mh 7NRXn8+b1zfE6f+A8OVKTYB6eLj07AqJTECb1g4wMkPSdtJvcxqSksUdL6ZNGuFZo1D8 tU3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=VpjqfdhR4H9l0zg06SsdMAGI/8xDdwIh8ltDSLPu31s=; b=uSlj5SVkkgf9E+MlAW1jEhFewCevZp6g3o3jwqcxoEexn7GHCf5qn1vS8gpMNpVjFw /qm201Ox5eyjzN6oeR6f/K7ATMmgi4n10JeVD/IOtHFIF+54cac/7TSgA/Y2S6OKwy9F uz2MpZkY3L1Vn2OnCffn6ebMewgVfcIrjRgaEN3qD2ps0X+QXRl9bvF/E0kabONyH66x DCIskc6Qa2Qq8jnadzVsqBluKYDKmuxZpfqd3AubxAFIWYG+nfwhgsD8OMg6whehEMiA 2C1yfJFP01iuv9xsQpmHwfiuq1L9MbElBdx/TfQ3Wgy4l0AEnguKpce3/Yzhcsnoinll kMmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hPY7hwNF; 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 h1si9119714pgp.637.2018.03.05.18.14.46; Mon, 05 Mar 2018 18:15:00 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hPY7hwNF; 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 S1753144AbeCFCN2 (ORCPT + 99 others); Mon, 5 Mar 2018 21:13:28 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:56382 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753077AbeCFCN1 (ORCPT ); Mon, 5 Mar 2018 21:13:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VpjqfdhR4H9l0zg06SsdMAGI/8xDdwIh8ltDSLPu31s=; b=hPY7hwNFlc45mjm5J1cepebsf j3cJtrL4btxxdE9Dw6fpnh8hKg3NDAmJ/T+grprIMXutgrHD41o1e3YUu562pKoMC4IzF7e1s0rlT i33fMTDhp6x1eo/IHa4J7nr3s9n/KQNlF15DfWOQI4E1Cf0Io7DwWrd34ETlhEGOIQ07W73d7DHYJ hRSqE1gHapIYB7oyma+fZEcyFQOY6Gwz3qzOonT1cD2a1RaWFKydJ1NHJ1lxRGTuctkr/bp7ZdbY5 oIn5P0D3eBAFJN09VdV2WOtvH17dFJuUtAnpDSKxsm/WqYEmIb5usBaLtOqnKavxuWSIl/K8Vxnih ASIfAeX6w==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1et26T-0006I4-Tn; Tue, 06 Mar 2018 02:13:22 +0000 Subject: Re: [PATCH net-next] modules: allow modprobe load regular elf binaries To: Alexei Starovoitov , davem@davemloft.net Cc: daniel@iogearbox.net, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, mcgrof@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, linux-api@vger.kernel.org References: <20180306013457.1955486-1-ast@kernel.org> From: Randy Dunlap Message-ID: <67abc3a2-80c9-7223-37c2-e15bbecdcd00@infradead.org> Date: Mon, 5 Mar 2018 18:13:19 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180306013457.1955486-1-ast@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 03/05/2018 05:34 PM, Alexei Starovoitov wrote: > diff --git a/kernel/module.c b/kernel/module.c > index ad2d420024f6..6cfa35795741 100644 > --- a/kernel/module.c > +++ b/kernel/module.c > @@ -3669,6 +3683,17 @@ static int load_module(struct load_info *info, const char __user *uargs, > if (err) > goto free_copy; > > + if (info->hdr->e_type == ET_EXEC) { > +#ifdef CONFIG_MODULE_SIG > + if (!info->sig_ok) { > + pr_notice_once("umh %s verification failed: signature and/or required key missing - tainting kernel\n", That's not a very friendly message to tell a user. "umh" eh? > + info->file->f_path.dentry->d_name.name); > + add_taint(TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK); > + } And since the signature failed, why is it being loaded at all? Is this in the "--force" load path? > +#endif > + return 0; > + } > + > /* Figure out module layout, and allocate all the memory. */ > mod = layout_and_allocate(info, flags); > if (IS_ERR(mod)) { thanks, -- ~Randy