summaryrefslogtreecommitdiff
path: root/48/38c1bb3cb854f7f0fbe3574770e2232db715e5
blob: d60022e7b641dc6a9f2abf501c433b55e3059431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
	helo=mx.sourceforge.net)
	by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <pieter.wuille@gmail.com>) id 1XmKbJ-0005R8-1h
	for bitcoin-development@lists.sourceforge.net;
	Thu, 06 Nov 2014 10:47:37 +0000
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.223.169 as permitted sender)
	client-ip=209.85.223.169; envelope-from=pieter.wuille@gmail.com;
	helo=mail-ie0-f169.google.com; 
Received: from mail-ie0-f169.google.com ([209.85.223.169])
	by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1XmKbG-0000ki-RT
	for bitcoin-development@lists.sourceforge.net;
	Thu, 06 Nov 2014 10:47:37 +0000
Received: by mail-ie0-f169.google.com with SMTP id tr6so2710590ieb.28
	for <bitcoin-development@lists.sourceforge.net>;
	Thu, 06 Nov 2014 02:47:29 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.51.16.36 with SMTP id ft4mr38436709igd.19.1415270849549;
	Thu, 06 Nov 2014 02:47:29 -0800 (PST)
Received: by 10.50.98.40 with HTTP; Thu, 6 Nov 2014 02:47:29 -0800 (PST)
In-Reply-To: <20141106103820.GA17096@savin.petertodd.org>
References: <20141106103820.GA17096@savin.petertodd.org>
Date: Thu, 6 Nov 2014 02:47:29 -0800
Message-ID: <CAPg+sBgBhemhPid0LcB9NAHckSmwPuQRRp-6CBVOe5CcOUH8NA@mail.gmail.com>
From: Pieter Wuille <pieter.wuille@gmail.com>
To: Peter Todd <pete@petertodd.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -1.6 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(pieter.wuille[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	author's domain
	0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
	not necessarily valid
	-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1XmKbG-0000ki-RT
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] SCRIPT_VERIFY_STRICTENC and CHECKSIG NOT
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Thu, 06 Nov 2014 10:47:37 -0000

On Thu, Nov 6, 2014 at 2:38 AM, Peter Todd <pete@petertodd.org> wrote:
> However the implementation of the STRICTENC flag simply makes pubkey
> formats it doesn't recognize act as through the signature was invalid,
> rather than failing the transaction. Similar to the invalid due to too
> many sigops DoS attack I found before, this lets you fill up the mempool
> with garbage transactions that will never be mined. OTOH I don't see any
> way to exploit this in a v0.9.x IsStandard() transaction, so we haven't
> shipped code that actually has this vulnerability. (dunno about
> alt-implementations)

Yeah, there's even a comment in script/interpreter.h currently about
how STRICTENC is not softfork safe. I didn't realize that this would
lead to the mempool accepting invalid transactions (I thought there
was a second validity check with the actual consensus rules; if not,
maybe we need to add that).

> I suggest we either change STRICTENC to simply fail unrecognized pubkeys
> immediately - similar to how non-standard signatures are treated - or
> fail the script if the pubkey is non-standard and signature verification
> succeeds.

Sounds good to me, I disliked those semantics too.

-- 
Pieter