From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B508F941 for ; Tue, 2 Aug 2016 18:12:47 +0000 (UTC) Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [66.63.167.143]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 2E7A821F for ; Tue, 2 Aug 2016 18:12:47 +0000 (UTC) Message-ID: <1470161563.2485.36.camel@HansenPartnership.com> From: James Bottomley To: Andy Lutomirski Date: Tue, 02 Aug 2016 14:12:43 -0400 In-Reply-To: References: <1469934481.23563.274.camel@linux.vnet.ibm.com> <1469979098.23563.300.camel@linux.vnet.ibm.com> <1469986138.23563.312.camel@linux.vnet.ibm.com> <20160801172920.GU3296@wotan.suse.de> <20160801202320.GB3296@wotan.suse.de> <20160801205706.GE3296@wotan.suse.de> <1470098031.18751.58.camel@HansenPartnership.com> <1470100412.18751.70.camel@HansenPartnership.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Johannes Berg , Kyle McMartin , Jason Cooper , "ksummit-discuss@lists.linuxfoundation.org" , Mark Brown Subject: Re: [Ksummit-discuss] Last minute nominations: mcgrof and toshi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2016-08-01 at 18:23 -0700, Andy Lutomirski wrote: > On Mon, Aug 1, 2016 at 6:13 PM, James Bottomley > wrote: > > On Mon, 2016-08-01 at 17:48 -0700, Andy Lutomirski wrote: > > > [1] The authattr mechanism isn't internally domain-separated, so > > > signatures with authattrs can be used to generate valid > > > signatures over invalid data. I think David Howells worked around > > > this in the kernel after I pointed it out. > > > > How? The only fiddle I can see you doing is swapping empty > > attributes for data and vice versa. > > Every valid PKCS#7 signature with authattrs is also a valid PKCS#7 > without authattrs over a messy ASN.1 object that contains the > authattrs. They forgot to make the thing that's fed to the raw > signature primitive distinct for the two modes. OK, I accept this, but for PKCS7 signatures, the signing and hashing algorithms are required to be part of the authenticated attributes, so this means that if they're missing we know the packet is invalid, so this attack should be unavailable against signed firmware. James