Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96007 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27827 invoked from network); 15 Sep 2016 18:48:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2016 18:48:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=scott@paragonie.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=scott@paragonie.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain paragonie.com designates 209.85.218.48 as permitted sender) X-PHP-List-Original-Sender: scott@paragonie.com X-Host-Fingerprint: 209.85.218.48 mail-oi0-f48.google.com Received: from [209.85.218.48] ([209.85.218.48:35316] helo=mail-oi0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 69/62-09226-00DEAD75 for ; Thu, 15 Sep 2016 14:48:33 -0400 Received: by mail-oi0-f48.google.com with SMTP id w11so82901937oia.2 for ; Thu, 15 Sep 2016 11:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragonie-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=pG3EKVzPPGtLpolvz9XFddy+TEx1VgryC4R2gZ3S6L0=; b=u3Vcy7hDnvSeksxLiRGL8VFb60A8FiyFF9jZrq7gywupR/8FQmP22XIAaufEURyVl7 VSMM9mS6rv07tRUvpR/XxdHiQRsANlOcyhdI2YQxYR6oSg663g3ERoEB7ynltYmjEkiS SsmO7BgmsCBS34B5JfHdtVLVUqkD4o+fj5M28OOqVxf3pOgAjqtn+5oUNbBVxLZWJ+Fq us3OLVN/TTJT0ejJpUUDzgMZGUuOyI+5FteFiUyMiMWr2UI6qawW/j8BDNlVYtdofAwJ HeRFJDx15Zj9Q8nx9P+7zuQgnSTgVzBU85R1aERN6CqyHEAETRkxd+4oRp0DZdANyFix j3Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pG3EKVzPPGtLpolvz9XFddy+TEx1VgryC4R2gZ3S6L0=; b=hri4nuWBZyCpRCwyIfSNMoyzKWTH9h/S1RYj+WOqQDyrfdOfPkOiyp+BGbu63cn5eT oYRORqSbqYqEmubirqCIFLTxEUoPNWF1domZptdpYa1zwDxFDwbXtvRw2Z2b4U0iHpjS gd5sbMBWqucW6ka5YYYtoxeYYUA2g/DYXJvKe9tjvQoPgvSxbiSadJJCIZCyJMmVJ6Jw zKp8ngQg0gixykBtbGhZwHa2rDsMf3DbCZ4CfZDjVo2/LODixKJuOq8TUNj3VWOACl44 hgG5Fs27BunnMFnZ0CkrBVTUEDs10k9Ezoxa19Iu9NJsXbhzwWWqSpyOBjuCCDU40YEd qpxA== X-Gm-Message-State: AE9vXwMCjoDC1BnbigQm23f/QAr1SBiuN7CszmzryGKqzhInHnAlmk84FojSffSIEn7uyDob0FJvIOxJyxsU0A== X-Received: by 10.202.105.72 with SMTP id e69mr8978668oic.187.1473965309336; Thu, 15 Sep 2016 11:48:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.25.135 with HTTP; Thu, 15 Sep 2016 11:48:28 -0700 (PDT) Date: Thu, 15 Sep 2016 14:48:28 -0400 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001a11407410acbe24053c904a55 Subject: HashDoS From: scott@paragonie.com (Scott Arciszewski) --001a11407410acbe24053c904a55 Content-Type: text/plain; charset=UTF-8 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 Scott Arciszewski Chief Development Officer Paragon Initiative Enterprises --001a11407410acbe24053c904a55--