Re: [apps-discuss] Review of draft-ietf-appsawg-json-pointer

"Manger, James H" <James.H.Manger@team.telstra.com> Fri, 16 November 2012 04:50 UTC

Return-Path: <James.H.Manger@team.telstra.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1C07021F8477 for <apps-discuss@ietfa.amsl.com>; Thu, 15 Nov 2012 20:50:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.752
X-Spam-Level:
X-Spam-Status: No, score=-0.752 tagged_above=-999 required=5 tests=[AWL=0.149, BAYES_00=-2.599, HELO_EQ_AU=0.377, HOST_EQ_AU=0.327, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cxYAfOp8IdDe for <apps-discuss@ietfa.amsl.com>; Thu, 15 Nov 2012 20:50:13 -0800 (PST)
Received: from ipxbvo.tcif.telstra.com.au (ipxbvo.tcif.telstra.com.au [203.35.135.204]) by ietfa.amsl.com (Postfix) with ESMTP id 9AA7E21F8472 for <apps-discuss@ietf.org>; Thu, 15 Nov 2012 20:50:12 -0800 (PST)
X-IronPort-AV: E=Sophos;i="4.83,261,1352034000"; d="scan'208";a="103758810"
Received: from unknown (HELO ipcavi.tcif.telstra.com.au) ([10.97.217.200]) by ipobvi.tcif.telstra.com.au with ESMTP; 16 Nov 2012 15:50:10 +1100
X-IronPort-AV: E=McAfee;i="5400,1158,6897"; a="142969302"
Received: from wsmsg3701.srv.dir.telstra.com ([172.49.40.169]) by ipcavi.tcif.telstra.com.au with ESMTP; 16 Nov 2012 15:50:09 +1100
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by WSMSG3701.srv.dir.telstra.com ([172.49.40.169]) with mapi; Fri, 16 Nov 2012 15:50:09 +1100
From: "Manger, James H" <James.H.Manger@team.telstra.com>
To: Mark Nottingham <mnot@mnot.net>
Date: Fri, 16 Nov 2012 15:50:08 +1100
Thread-Topic: [apps-discuss] Review of draft-ietf-appsawg-json-pointer
Thread-Index: Ac3DsVfpb1RjC6APRY2NyTWdVSnQewAACFNg
Message-ID: <255B9BB34FB7D647A506DC292726F6E115006C7BCF@WSMSG3153V.srv.dir.telstra.com>
References: <D8B6B887-7206-4197-B78D-7E2B38A20EF9@vpnc.org> <255B9BB34FB7D647A506DC292726F6E115006C7A5C@WSMSG3153V.srv.dir.telstra.com> <45B7BA35-8717-4597-902B-168E7B894A68@mnot.net>
In-Reply-To: <45B7BA35-8717-4597-902B-168E7B894A68@mnot.net>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, "apps-discuss@ietf.org Discuss" <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] Review of draft-ietf-appsawg-json-pointer
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Nov 2012 04:50:18 -0000

> > The issue with NUL is that you need to be careful not to misinterpret
> it as an end-of-string marker. How about:
> >
> >   Note that JSON pointers can contain the NUL (Unicode U+0000)
> >   character. Care is needed not to misinterpret this character
> >   in programming languages that use NUL to mark the end of a string.
 
> In Security Considerations?

Yes. Treating NUL as end-of-string is more of a security issue than not being able represent some characters.

Bad guys stuck NULs in domain name fields in certificates (eg paypal.com<NUL>www.badguy.net). One party treats it as a (harmless) subdomain of badguy.net; another party is fooled into believing it is for paypal.com. Result: security failure.

Consider the pointer "/readonly\u0000abc" in a patch {"op":"remove", "path":"/readonly\u0000abc"} applied to a doc {"readonly":"MUST NOT BE TOUCHED", "anyone":"can change anything else"}. A security layer that properly handles NUL will allow the patch through; but a subsequent processor that isn't careful about NUL might treat the pointer as "/readonly" and disaster results.


About the only other security consideration I can think of is checking that an array index does not overflow a programs representation (eg don’t treat "/4294967297" as "/1", throw an error if necessary).

--
James Manger