Re: [precis] I-D Action: draft-ietf-precis-7564bis-09.txt

Sam Whited <> Mon, 18 September 2017 15:10 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 0436413428D for <>; Mon, 18 Sep 2017 08:10:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.721
X-Spam-Status: No, score=-2.721 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key) header.b=cbHpbp20; dkim=pass (2048-bit key) header.b=LDcCi6WW
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id yabPYC_HPuPh for <>; Mon, 18 Sep 2017 08:10:46 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 6CFB51321A2 for <>; Mon, 18 Sep 2017 08:10:46 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal []) by mailout.nyi.internal (Postfix) with ESMTP id 98AC3212DD; Mon, 18 Sep 2017 11:10:45 -0400 (EDT)
Received: from web5 ([]) by compute4.internal (MEProxy); Mon, 18 Sep 2017 11:10:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=VwUXWCfv9DLSuAa7M 5yiHquDU6a45imJm55/NMRFffs=; b=cbHpbp20m9yvLYrHkEa9w3rHrtWKN1pfw oFHqxhjUg18vJVNs2bBGPYWvvBTYlwIg62lNP1iXgHe8nsr8ZYLGXlsvTHOJm3f+ NQRUYcEqE1+tpuxTqFQHFV9jpzQ7/ICRhunzCq9N2dHjTN4rpdOPDxX9FtT+olWM rlt74mD3+a5SRyooquYYzmjBt+sQfBcybfndwpnKzGDDKEo6V30omeo4g0dsrct2 W4qjL48wdkQlEuQaS8jZ6jXAfVNQoqXGFwjxcYEycHiTNCNCf+rUsWthwRi8FFCM KewhrZBFA+PCD6beU5lwzwh4c/nhNfqwEyR4cW+0IA4gqxXnjOS4w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=VwUXWC fv9DLSuAa7M5yiHquDU6a45imJm55/NMRFffs=; b=LDcCi6WWmzk+/oIy+YWFxM RgTrPJhBDvK2YCim+WEv2UIoGaeibJxZeu/7o01o1jERvT1pEN1tMHKhRAgNhb28 7GsuUrC8ospkRx41A3FtLHY+KpQ5aZhb7chzGFgGJIx2R/BWZj7SyUBFE3lodTYr QVTGspPDBRfC+42mXNNKl5XgYy/Xyp+SEJ8MnLksm1WcNxlq7mDQqRKIrMy4mfUe yfizpzREnXBA5S/UGsuoVaTlH119KjQwYVGfqUusQzz+6j11bcU55LTXNWqX/9zM GKlYV4GOpDch5uh64VRmpz4nwL4/mpiaPNHlvg7dgIYl7od6AnvqyTxiAVnRkCRg ==
X-ME-Sender: <xms:9eG_WbA7mM9HGiIDvRDikYpvgpvA-Pvo6hVNCanUwaZN--2N_gszlg>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 3900F9E2E6; Mon, 18 Sep 2017 11:10:45 -0400 (EDT)
Message-Id: <>
From: Sam Whited <>
To: "Peter Saint-Andre" <>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
X-Mailer: Webmail Interface - ajax-64b08692
In-Reply-To: <>
References: <> <> <> <> <> <> <> <> <> <> <> <> <> <> <>
Date: Mon, 18 Sep 2017 10:10:45 -0500
Archived-At: <>
Subject: Re: [precis] I-D Action: draft-ietf-precis-7564bis-09.txt
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Preparation and Comparison of Internationalized Strings <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 18 Sep 2017 15:10:49 -0000

On Mon, Sep 18, 2017, at 08:21, Peter Saint-Andre wrote:
> Until we can get to the bottom of this, I'm going to ask the RFC Editor
> to "pause the presses" for a few days. I'll try to find time later today
> to propose a sentence or two that we can add to the introduction or
> security considerations or both.

Thanks. Let me try again to clarify why the current state of the RFCs
makes me so nervous, and why I think the solution isn't as simple as
adding more copy:

We cannot address every security concern in every RFC. This brute force
method (adding a new paragraph to the security considerations section)
doesn't scale, and we'll never find all the specific issues. Instead, we
have to write standards in such a way that it actively difficult to make
a mistake that will lead to a security flaw (not that we shouldn't
document any potential gotchas that we can't get rid of, but we should
also make them hard to do in the first place). One way we do this is
with consistency. Right now, the nickname profile is the *only* profile
that is non-idempotent, this is inconsistent.

The reason this matters is that most developers won't read the RFC
carefully (or possibly, at all). There is nothing we can do about this,
and when developers don't read the RFC we should not blame them for the
flaws that result. Reading an RFC is a huge amount of work, so naturally
most people won't. Instead we need to write specs in such a way that
they won't break it if they just look at the examples, or just skim the
sections that sound like they're related to what the dev is trying to

When I implemented PRECIS I did read the core RFC, built tables, added
rules, built an API for composing those rules into profiles, and then
went to create the profiles. I did *not* read the profile RFCs (until
later when reviewing them for this process, but that's not something
most devs will do). Instead, I skipped down to the section that listed
the rules for enforcement, saw case mapping, width mapping, etc. and
threw those the existing transformers I'd written together in the order
specified and called it a day. If I had not been on this mailing list I
would never have known that the nickname profile was non-idempotent.
This is how most developers will probably do things. Adding more text to
address security concerns won't help, since they never saw what was
there already. If they didn't get the message from X pages of text,
they're even less likely to get it from X+n pages.

Even if I did notice that the nickname profile is non-idempotent, there
are pressures against a correct implementation: multiple passes over the
data makes an already expensive operation even more expensive (2–3 times
more in the naive case) and it's just more work to do the right thing
(whereas it's easy to pass that work onto the application developers
using your implementation and assume they'll take care of it and iterate

All this means that, by default, the RFCs make it easy to leave the
nickname profile non-idempotent (either by mistake, or intentionally due
to the pressures against fixing it). The question then becomes: "is that
a problem?" In the case of the non-idempotency of the nickname profile,
I think the answer is "yes".

For a somewhat concrete example, imagine a multi-user chat room. If a
user connects and sets their nickname, a single iteration of the
nickname profile is run on it, and it *should* match another user in the
room but doesn't because of this issue, that user can use the nickname
and is allowed into the room. This may be fine, we expect this to happen
anyways on occasion because we're using the freeform class. Now,
however, the user sends a query to the server that is handled by a third
party system; maybe it's a file upload that is delegated to another
server which stores the file at /files/<nickname>/myfile. This second
application applies the nickname profile again, however, this now makes
it identical to the original users nickname (because the fileserver got
a nickname that the chat server already enforced) and their files get
stored in the same place, meaning the new user whos nickname is slightly
different can overwrite the first users files and use that to send
malicious files to the original chat participants friends even though as
far as the chat system is concerned they are separate users. This is a
silly contrived example, and maybe the administrators shouldn't have
been using the nickname profile for their filenames in the first place
in this case, but any time there are two systems that might both enforce
the nickname profile you end up with a possible inconsistency like this,
and I'm sure there will be one where it feels perfectly reasonable to
use the nickname profile, but where the actual vulnerability comes from
the fact that you don't expect the nickname to end up being different
between the two systems. Note that in this example that it only matters
that the chat server used a broken implementation that did not iterate
multiple times, the file server could be using a perfectly correct
implementation and the issue would still exist.