Re: [Acme] Signature misuse vulnerability in draft-barnes-acme-04

Andrew Ayer <agwa@andrewayer.name> Wed, 12 August 2015 23:16 UTC

Return-Path: <agwa@andrewayer.name>
X-Original-To: acme@ietfa.amsl.com
Delivered-To: acme@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2DF801B2A01 for <acme@ietfa.amsl.com>; Wed, 12 Aug 2015 16:16:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k2lX8amg1aZv for <acme@ietfa.amsl.com>; Wed, 12 Aug 2015 16:16:18 -0700 (PDT)
Received: from alcazar.beanwood.com (alcazar.beanwood.com [70.85.129.230]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 21DFA1B2A09 for <acme@ietf.org>; Wed, 12 Aug 2015 16:16:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=andrewayer.name; s=alcazar2; t=1439421377; bh=M4YzLrd+44tGG2Jys1lGnZdMlQTzn8aD6Ji3UKz83zg=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=bAWHpwLNErRchaQCFOQwIkVdn8XGpDCUPa/k2SnyvEV4Ym/gEux9ay3gDL66/dwvn zJwN+wWt/gpfdg1jyDplr4qXudqBnHqEeLVLDm7KNK0ndccCBjzJV4SJbBTS1zQDD2 tdnD/Z218xHFGrwBseDWG/ctuuRKr7Zfx/Wi3hFJ7b2wAaKFNIfqWldkO5gxpuwTOs KR57o+jk44ZIWfc5ObYrOcJ50BLo1OWXqvK5z4A7xRv8odlTT6WzkhH8mzu0OUbC1E 0R6n11Y1Nb0BNMCWeAp2/ywmTnh2L6kVsptiZOkpsrD0q+4ADqzyAp9hcqTlJbO2Ac A+s8DVTos1TTw==
Date: Wed, 12 Aug 2015 16:16:17 -0700
From: Andrew Ayer <agwa@andrewayer.name>
To: yan <yan@eff.org>
Message-Id: <20150812161617.c777cb5bff60681afa43bedb@andrewayer.name>
In-Reply-To: <55CBB2D8.2080504@eff.org>
References: <20150811085205.bbcd37b3b0bb0482f6522b1a@andrewayer.name> <CAL02cgRf2M0Gkqymif-=rmNG0v9hhaMC2SBiXf-n5aYiRKBnmQ@mail.gmail.com> <55CBB2D8.2080504@eff.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/acme/M6b3SbmMeXo7nA8GVhk3aDGYnA8>
Cc: Richard Barnes <rlb@ipv.sx>, "acme@ietf.org" <acme@ietf.org>
Subject: Re: [Acme] Signature misuse vulnerability in draft-barnes-acme-04
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Automated Certificate Management Environment <acme.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/acme>, <mailto:acme-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/acme/>
List-Post: <mailto:acme@ietf.org>
List-Help: <mailto:acme-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/acme>, <mailto:acme-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Aug 2015 23:16:22 -0000

On Wed, 12 Aug 2015 13:55:52 -0700
yan <yan@eff.org>; wrote:

> On 8/11/15 10:52 PM, Richard Barnes wrote:
> 
> > Smallest diff change from the current document would be simply to
> > explicitly require validation value bound to account key that
> > created it -- not the one the signs the response.  Since the attack
> > requires that the attacker change keys (using recovery) after
> > receiving the token, the attack only works if the validation is
> > done against the new public key.  This option introduces
> > non-trivial implementation complexity, though, since the server now
> > has to remember what key signed the new-authorization request that
> > caused the challenges to be issued.
> 
> Doesn't it already have to remember this? The current instructions
> for verifying a DNS challenge says: "1. Verify the validation JWS
> using the account key for which this challenge was issued."
> 
> Since the challenge was issued before the attacker initiated account 
> recovery to do the key change, the wording implies that the server 
> remembers the original key at validation time.

That wording is bound to trip up implementers - in fact, a quick look
at the Boulder source indicates it validates against the current account
key, not the account key at the time the challenge was issued[1] :-)

I think this would be a pretty fragile way to work around what is
fundamentally a crypto problem.

Also, only DVSNI and DNS currently use this language - the wording for
the Simple HTTP challenge is "Verify that the body of the response is
[...] signed with the client's account key".  The wording should
probably be clarified and made consistent among the challenges.

Regards,
Andrew

[1]
https://github.com/letsencrypt/boulder/blob/7eae93873d394c359c371621c4e9064c9e780f19/va/validation-authority.go#L381,
which is ultimately called from
https://github.com/letsencrypt/boulder/blob/7eae93873d394c359c371621c4e9064c9e780f19/ra/registration-authority.go#L380,
where the account key comes from the registration object.