From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2DBwx1Y019932 for ; Tue, 13 Mar 2012 12:58:59 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AocBACg2X0/RVdU2kGdsb2JhbABDhTewIQgiAQEBAQkJDQcUBCOCCQEBAQQSAg8dARseAwwGBQsNAgImAgIiAREBBQEcBhMih2ifNgqLLEyCcYUxP4h0AQULgSSOIIEWBJVPjkU9hAc X-IronPort-AV: E=Sophos;i="4.73,575,1325458800"; d="scan'208";a="149068622" Received: from mail-yw0-f54.google.com ([209.85.213.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 13 Mar 2012 12:58:54 +0100 Received: by yhgm50 with SMTP id m50so695228yhg.27 for ; Tue, 13 Mar 2012 04:58:53 -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 :content-type:content-transfer-encoding; bh=QJQLfw/8RUngDDISFjOXyHxThCB5nXw7R/JViMX3ksY=; b=AfrfDKjxC770T1cTCpM9yJNhcn+0MIpGNqMasKjKmExy75INGdf/rVYteSj7Laml/c QD74VC3jfrYw0OM1PUkvkmqLHUCenYr+GYQKu7h3+3yBK+ODEzFwSVf8ssRZF4/AzyBT i5y28i39ZWP6iG15Nsk3MQkHnxMQPFIC4JOTP6+9MEiNOLRKLelfOwvLnr7RxEG7N6nf eewsOK3kSIYuNFO8+8+frodgOaoE5YlqaPug1X4Hel+W5hbQzRM3IHHX8ClC9bXuXFZ8 tFsC1S7r1/YawIQoydVIDn4mGFJZleYy0AICrBPfbVkkfe84K9OG1rGciGUXU2Dx8wji jcfA== Received: by 10.60.1.7 with SMTP id 7mr10973273oei.71.1331639933240; Tue, 13 Mar 2012 04:58:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.19.39 with HTTP; Tue, 13 Mar 2012 04:58:13 -0700 (PDT) In-Reply-To: <4F5F1968.20600@lsv.ens-cachan.fr> References: <4F3078F1.8070105@redhat.com> <4F3079F7.4040606@redhat.com> <20120207083412.GA30350@annexia.org> <20120310073113.GA16716@annexia.org> <4F5E3A6E.4010406@inria.fr> <4F5F1968.20600@lsv.ens-cachan.fr> From: Paolo Donadeo Date: Tue, 13 Mar 2012 12:58:13 +0100 Message-ID: To: OCaml mailing list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q2DBwx1Y019932 Subject: Re: [Caml-list] Re: [oss-security] CVE request: Hash DoS vulnerability (ocert-2011-003) In my humble opinion, here we have two different vision of what computer programming is, or should be. Your statement "maybe it's better to assume that the programmer will not be aware of attacks" may be true for the average Java programmer (please, no flame, no insult intended to Java programmers reading this list!) but not for an OCaml programmer. I want to be perfectly aware of attacks, and I want to be in control of the data structure I use, and not "be unaware"... In Python, the other language I use every day, dictionaries are implemented as hash tables and not having reproducibility is a PITA. -- Paolo On Tue, Mar 13, 2012 at 10:54, Romain Bardou wrote: > Hi, > > >> As you and Gerd said, the new Hashtbl implementation in the upcoming >> major release has everything needed to randomize hash tables by >> seeding.  The question at this point is whether randomization should >> be the default or not: some of our big users who don't do Web stuff >> value reproducibility highly...  We (OCaml core developers) will take >> a decision soon. > > > FWIW, as a developer I do not expect reproducibility from Hash tables (nor > from the Random module actually) but I do expect some way to control > reproducibility (i.e. read the current seed, give my own seed). Maybe it's > better to assume that the programmer will not be aware of attacks, and > provide him with a safer environment. > > On the other hand, when you find a bug and need reproducibility, it's too > late if you have used a random seed without recording it. And could it break > some existing applications? > > I guess you('re) already had(having) this discussion though. > > Cheers, > > -- > Romain