Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79909 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31628 invoked from network); 24 Dec 2014 07:23:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Dec 2014 07:23:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.41 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.41 mail-qa0-f41.google.com Received: from [209.85.216.41] ([209.85.216.41:38787] helo=mail-qa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/B0-25055-2F96A945 for ; Wed, 24 Dec 2014 02:23:30 -0500 Received: by mail-qa0-f41.google.com with SMTP id s7so5384949qap.28 for ; Tue, 23 Dec 2014 23:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ujjZ7AHV/sKUYBPBe3BiH4fKZteXgt6GYpQq/Y+1/yk=; b=bvzB6LYXwtA/p0atgroS4maHwWWhRlg5NWS/3mSsdCQUs++gzPYPZ7RMy3SmCaYZUd dgum4IaxKHstl6kFLv7Ld7JG04nwl11B5Hb2VHY0MlHk7Al4GfzmqTnOF6rI9491Sy6q TLzaId3S8MRmIyD/3fkQetFvHSZbiD7LEu2iPCbmVyWtG0UhTsiwzS9EVkpTa2ndjhyB h7N24Zhv3X//tqKUxcube6+dlKChJWAC+27Hd0VoxUVj6ilsZ/3cwT+ye6GWmCaE2AKi cmRH8jo8VeSzh4sqRpvmY4PycnoQzvaI7DiruldzYIl9mHIvPwlzr34r+QXwq0fFQh48 Pw3g== MIME-Version: 1.0 X-Received: by 10.229.126.5 with SMTP id a5mr30281985qcs.14.1419405807817; Tue, 23 Dec 2014 23:23:27 -0800 (PST) Received: by 10.140.22.106 with HTTP; Tue, 23 Dec 2014 23:23:27 -0800 (PST) Received: by 10.140.22.106 with HTTP; Tue, 23 Dec 2014 23:23:27 -0800 (PST) In-Reply-To: <09B14273-C621-4AB9-9129-A149A9480A03@ajf.me> References: <09B14273-C621-4AB9-9129-A149A9480A03@ajf.me> Date: Wed, 24 Dec 2014 18:23:27 +1100 Message-ID: To: Andrea Faulds Cc: Yasuo Ohgaki , PHP internals , Scott Arciszewski Content-Type: multipart/alternative; boundary=001a1132e2c0f79d90050af12a57 Subject: Re: [PHP-DEV] JSON HASHDOS From: pierre.php@gmail.com (Pierre Joye) --001a1132e2c0f79d90050af12a57 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Dec 24, 2014 3:17 AM, "Andrea Faulds" wrote: > > > > On 23 Dec 2014, at 20:12, Yasuo Ohgaki wrote: > > > > Hi, > > > > On Wed, Dec 24, 2014 at 4:51 AM, Pierre Joye wrote: > > > >> This issue has been reported earlier on security@php.net and is being > >> discussed and analyzed. It is not a simple task. > >> > > > > If we are not going to use other hash (i.e. half MD4 like other langs), how > > about > > add max allowed collisions? It would be simple and fast enough. I'm not > > looking > > at the code, so I could be wrong. > > Hey, > > We could implement a special JSONObject class with custom __get/__set handlers and that=E2=80=99s Traversable, which implements a randomised hash= ing algorithm rather than using zend_hash. That could be overkill though. Please keep in mind that this problem is: . not json specific . not specific at runtime but could also happen before a script get the han= d A randomized hash only postpone the issue but won't solve it. I fear that a fix is way more work that what we may think. A discussion is going on security, let hope to get something in a reasonable time. I also wonder what we could provide right now to at least prevent script kiddies attacks during this holiday season... --001a1132e2c0f79d90050af12a57--