Re: [Json] Bug in RFC7493 (I-JSON)?

Tim Bray <tbray@textuality.com> Sun, 06 May 2018 06:34 UTC

Return-Path: <tbray@textuality.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AE709126C25 for <json@ietfa.amsl.com>; Sat, 5 May 2018 23:34:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.349
X-Spam-Level:
X-Spam-Status: No, score=-2.349 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, HTML_OBFUSCATE_05_10=0.26, RCVD_IN_DNSWL_LOW=-0.7, T_DKIMWL_WL_MED=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=textuality-com.20150623.gappssmtp.com
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 RSJ0NRjzj0ZY for <json@ietfa.amsl.com>; Sat, 5 May 2018 23:34:27 -0700 (PDT)
Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E036126B6D for <json@ietf.org>; Sat, 5 May 2018 23:34:27 -0700 (PDT)
Received: by mail-wm0-x22d.google.com with SMTP id j5-v6so10934154wme.5 for <json@ietf.org>; Sat, 05 May 2018 23:34:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=textuality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LtWYz60P9j0UK873RAytr52hW1MsYgdPYULZCjYQXWY=; b=sr1EDbu1IWR0k9j3+WUiiVJz8484jWIATkKRWBosXNXI/SSRJpdmtDaLTzEqRHAbat 2y/3HJBxRahvtcgc5aOKrMiYnp04lcuzRmCAqGnTMCK3xV+x2hQj9quS1w1f7fhwwSqI aItJVd2v7LCrr+WTq8aF9Dsy7sJVHPCP8sPDh3KKIA8wrTkR66FzSycyGhwePotch5H7 QzTeXOMWOH/ClXILMwvhcp2KV2F3AXACLL8kRKU4jICKEGL9ROpZWyVBDNW0XpevxLwB OF/ul5kGJ33sydKuvIIRdKXxFB/KhSyVpbYiEEBnG0oKoUMHNuE64tDHNN79d/iaN9aK W8Fw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LtWYz60P9j0UK873RAytr52hW1MsYgdPYULZCjYQXWY=; b=tMBiuEdTD4Q+hRvdV/gkhp15pY+zoIhGwcXfj9bfSXUvPELFWPWnuELRy9hHp5MJnv hBA95A5SPDy8D6R3RavH4qHkP/jG5rd7sh6k8i4bAse3b5XhsOTWU2FHfudOOuA6J7AD NUNZI/iuPHvxPTH24X0xsoMcLL0e42fHUsX26Wsr765/QN2xN8+8/UH7jMsbMDJXL2tz PQj/KpiFg++JoEgn6IyVZpiTJPYNUPWfro4uHADe8VB6qg4X5wdDioF8sbWcGQHEnDES AB9mSfJZEfhkZgV7i6k/FbbF17mj7CzJkngg2e7N9gNx9b1AMQeP22yYviI7kv+yaBLa S47g==
X-Gm-Message-State: ALQs6tCkvcbJeHP4ndcpOwlIjNPurTwuy2czrsRd3NWG4QcOrPKaZsc/ uZ6eBbYqyUEGfQWjx9aQ0eDY2oWbskCvTAt5G/8B6g==
X-Google-Smtp-Source: AB8JxZo0/MDBiFBCQmhMar8k1x3Tyiqd0exADdTTpEwDdbjuBDrBekzOe6QyHB0QivGds271ui97kpOEZLdUscU5Aa4=
X-Received: by 2002:a50:bd84:: with SMTP id y4-v6mr31325139edh.18.1525588465726; Sat, 05 May 2018 23:34:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.80.188.6 with HTTP; Sat, 5 May 2018 23:34:05 -0700 (PDT)
X-Originating-IP: [24.86.156.110]
In-Reply-To: <d9235420-09e2-4d25-1e4d-19848e2c48d8@gmail.com>
References: <d9235420-09e2-4d25-1e4d-19848e2c48d8@gmail.com>
From: Tim Bray <tbray@textuality.com>
Date: Sat, 05 May 2018 23:34:05 -0700
Message-ID: <CAHBU6iv_FGXgXkQ9CExKXnsgfcEct095s=2ef6wLvt9yXAhR6Q@mail.gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Cc: "json@ietf.org" <json@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000092c701056b83bedf"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/hBx1Mjvj5DfbKAFya541OdAzHsY>
Subject: Re: [Json] Bug in RFC7493 (I-JSON)?
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 06 May 2018 06:34:30 -0000

So… the spec underpromises and overdelivers :)

Seriously, I wonder if this behavior is portable across IEEE 754
implementations.

On Sat, May 5, 2018 at 11:21 PM, Anders Rundgren <
anders.rundgren.net@gmail.com> wrote:

> During testing of the JSON canonicalizer [1,2] I tried with an integer
> just above the specified limit (2**53) + 1 and to my surprise it didn't
> fail.
> A short run with an IEEE-754/ES6 debugger seemed to confirm that +-2**53
> is the actual limit for integers.
>
> Input floating point: 9007199254740991
> Output floating point: 9007199254740991
> Hex value: 433fffffffffffff
> Binary value: 0 10000110011 111111111111111111111111111111
> 1111111111111111111111
>
> Input floating point: 9007199254740992
> Output floating point: 9007199254740992
> Hex value: 4340000000000000
> Binary value: 0 10000110100 000000000000000000000000000000
> 0000000000000000000000
>
> Anders
>
> 1] https://github.com/cyberphone/json-canonicalization#json-can
> onicalization
> 2] https://cyberphone.github.io/doc/security/draft-rundgren-jso
> n-canonicalization-scheme.html
>
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>



-- 
- Tim Bray (If you’d like to send me a private message, see
https://keybase.io/timbray)