From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752346AbcAEPzo (ORCPT ); Tue, 5 Jan 2016 10:55:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38134 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbcAEPzn (ORCPT ); Tue, 5 Jan 2016 10:55:43 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20160105154703.31650.95150.stgit@warthog.procyon.org.uk> References: <20160105154703.31650.95150.stgit@warthog.procyon.org.uk> Cc: dhowells@redhat.com, dwmw2@infradead.org, David Woodhouse , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, Mimi Zohar Subject: Re: [RFC PATCH] X.509: Don't check the signature on apparently self-signed keys [ver #2] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32190.1452009340.1@warthog.procyon.org.uk> Date: Tue, 05 Jan 2016 15:55:40 +0000 Message-ID: <32191.1452009340@warthog.procyon.org.uk> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Howells wrote: > If a certificate is self-signed, don't bother checking the validity of the > signature. The cert cannot be checked by validation against the next one > in the chain as this is the root of the chain. Trust for this certificate > can only be determined by whether we obtained it from a trusted location > (ie. it was built into the kernel at compile time). > > This also fixes a bug whereby certificates were being assumed to be > self-signed if they had neither AKID nor SKID, the symptoms of which show > up as an attempt to load a certificate failing with -ERANGE or -EBADMSG. > This is produced from the RSA module when the result of calculating "m = > s^e mod n" is checked. Oops - I forgot to change the patch description. David