Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57301 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60943 invoked from network); 9 Jan 2012 16:54:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2012 16:54:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:59365] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/43-46289-DBB1B0F4 for ; Mon, 09 Jan 2012 11:54:23 -0500 Received: by lagj5 with SMTP id j5so1545143lag.29 for ; Mon, 09 Jan 2012 08:54:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=QGmtVSnQm+PtQJTWF2YxUjt5PDnhFVaFe14w+Vz81kU=; b=RDYmlo14Qge1Ovf8lHoVIrlV3yUk8zmV2q3RHq5f+hHaDPVd/o/ROKDY0xuEQe7pao e5FuEMhjs3ScoNckBrEoH0nIckYB2u2zdis6yAc/y0kzXgkIcely2muWSeEmRDSmp/oi j5XDdUEU6EmZz/q4Mn+YdvZorCBJbZMMylWH0= MIME-Version: 1.0 Received: by 10.112.27.74 with SMTP id r10mr3552111lbg.20.1326128058608; Mon, 09 Jan 2012 08:54:18 -0800 (PST) Received: by 10.152.18.197 with HTTP; Mon, 9 Jan 2012 08:54:18 -0800 (PST) In-Reply-To: <6268389813742875794@unknownmsgid> References: <6268389813742875794@unknownmsgid> Date: Mon, 9 Jan 2012 17:54:18 +0100 Message-ID: To: Xinchen Hui Cc: Pierre Joye , PHP internals , =?ISO-8859-1?Q?Johannes_Schl=FCter?= , Laruence Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: 5.3.9, Hash DoS, release From: nikita.ppv@googlemail.com (Nikita Popov) On Mon, Jan 9, 2012 at 5:36 PM, Xinchen Hui wrote: > Hi: > =A0 I have a new idea, which is simple and also works for Jason/serialize= d etc. > > =A0That is Restricting a max length of a buckets list in a hash table. > > =A0 If a bucket's length exceed 1024, any insertion into this bucket > will return failure and a warning will be generated. > > =A0 What do you think? That seems like a very good approach (until we have randomization). It would fix the issue in a generic way so not all functions need to be patched one by one. It also will not hurt legit uses of many POST variables (or large serialized arrays).