Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96008 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29438 invoked from network); 15 Sep 2016 18:56:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2016 18:56:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.173 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.173 mail-yw0-f173.google.com Received: from [209.85.161.173] ([209.85.161.173:34942] helo=mail-yw0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/B2-09226-DEEEAD75 for ; Thu, 15 Sep 2016 14:56:45 -0400 Received: by mail-yw0-f173.google.com with SMTP id u82so64574708ywc.2 for ; Thu, 15 Sep 2016 11:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Qhq/NsTqld2m2XL8Y4J2BTmbqzknZi6oXOh+Jq3aG8A=; b=ExLoFgNVnOJvMM4HXdscut3ZVka0LGWrn5un8uNtvvfuRqZvUikhIaKynui5vhS9oC wjltAypeSRfYa/0V7e8WvOmrJwNqND+SR0+bLAhyuDbR4AW1c4dznpnqhz0j22jgA2kv zhXieoEKPweCSPTjo5tIiqka3m/5ao4ZY9xlnb9CDeu+wxDUq03T2IrxCiqDlmcn3YdU XQECTzRCe93Q4GWlNWG9TUY21xSN9YpOioPpt0mBK+Ga/hcCxS92bYswfBEw9w94T7uD EKzA8Bkd9XMkpim4jG7SJQ97e68KURc+MCT4dquFF4ac5Lp0EOBsTvmgLHy6IHTmYuPS duZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Qhq/NsTqld2m2XL8Y4J2BTmbqzknZi6oXOh+Jq3aG8A=; b=E5jnWWNcG6MSeIT8ys6AJhppTck38wa8pWBQr5lMxd8CQ+z0Q0/+XiwJbNVRny7K/+ rU3JaHJSC32Myd6eH36ocg4NI+CT8uK+7VLtqNE8HIypdpgYud1rKpRPkRjFa+id/iaj S3mRBPq4BG9F/kS5RvbmlnFGR57Vrl9+b1GHu1ubsb47BSkcSIAsuRSVj0pSPsQdDbh+ j524GvitFTckybEGEgwmOsHDXaPQ1mJSP64En94T0rO7Ek4IYDz3nEVRsEI/wGCJ6Ji6 IljiSEDaCY+peWv968iN7UamRzYMD5OzOD0iBjffxqzOP/7j5/9ksrYSeSY3rdZKhTVO tAEA== X-Gm-Message-State: AE9vXwM98uEsqV2Slx1+7CIGR7S+q1UsHICw1y5O3xr6sFSovY3Yx2Q2eSEqQvMHe1gf9yjWZM6H9WShw+F0zw== X-Received: by 10.13.234.8 with SMTP id t8mr10135503ywe.170.1473965802726; Thu, 15 Sep 2016 11:56:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.215.139 with HTTP; Thu, 15 Sep 2016 11:56:42 -0700 (PDT) In-Reply-To: References: Date: Thu, 15 Sep 2016 20:56:42 +0200 Message-ID: To: Scott Arciszewski Cc: PHP Internals Content-Type: multipart/alternative; boundary=94eb2c0872da152b3d053c9068ef Subject: Re: [PHP-DEV] HashDoS From: nikita.ppv@gmail.com (Nikita Popov) --94eb2c0872da152b3d053c9068ef Content-Type: text/plain; charset=UTF-8 On Thu, Sep 15, 2016 at 8:48 PM, Scott Arciszewski wrote: > Would the Internals team be open to discussing mitigating HashDoS in a > future version of PHP? i.e. everywhere, even for json_decode() and friends, > by fixing the problem rather than capping the maximum number of input > parameters and hoping it's good enough. > > I'd propose SipHash (and/or a derivative): https://www.131002.net/siphash/ > > (Look at all the other languages that already adopted SipHash.) > > https://medium.freecodecamp.com/hash-table-attack-8e4371fc5261#.s5r5j42x3 > Previous discussion on the topic: http://markmail.org/message/ttbgcvdu4f7uymfb Nikita --94eb2c0872da152b3d053c9068ef--