From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2DISJCJ002133 for ; Tue, 13 Mar 2012 19:28:20 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgIEAKqQX09RZ90xlGdsb2JhbABDtWsiAQEBAQkLEhQDJIIJAQEBBIEJAgEIGAokMhcBDQIEARqIAwMHvBCKLIVWYwSIIo0ukwiBVA X-IronPort-AV: E=Sophos;i="4.73,578,1325458800"; d="scan'208";a="135883496" Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by mail4-smtp-sop.national.inria.fr with ESMTP; 13 Mar 2012 19:28:19 +0100 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20120313182819.KCTI14668.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com>; Tue, 13 Mar 2012 18:28:19 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20120313182819.ILEN10211.aamtaout01-winn.ispmail.ntl.com@romulus.metastack.com>; Tue, 13 Mar 2012 18:28:19 +0000 Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id q2DISFJS018146 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 13 Mar 2012 18:28:15 GMT Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.01.0355.002; Tue, 13 Mar 2012 18:28:15 +0000 From: David Allsopp To: Dario Teixeira , OCaml mailing list Thread-Topic: [Caml-list] Re: [oss-security] CVE request: Hash DoS vulnerability (ocert-2011-003) Thread-Index: AQHM5TxKH1XM0INoOESjbBaqMVzrEZYxHBAAgDI5AYCAA9VOAIABCc8AgAAie4CAAAlZAIAADmmAgABPxACAAALb8A== Date: Tue, 13 Mar 2012 18:28:15 +0000 Message-ID: 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> <4ec32a156daa6211ca4d465c9a7b8745.squirrel@gps.dynxs.de> <1331662124.86804.YahooMailNeo@web111509.mail.gq1.yahoo.com> In-Reply-To: <1331662124.86804.YahooMailNeo@web111509.mail.gq1.yahoo.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.7] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=40hZHaDki8MA:10 a=V8lMrATVidEA:10 a=cTs9vV391PwA:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=cYo96mpsAAAA:8 a=SOjZF4FgtzY5hcNXJRAA:9 a=-3mLERtHMyGy8WKa_5EA:7 a=wPNLvfGTeEIA:10 a=DWEyeswsoNYA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q2DISJCJ002133 Subject: RE: [Caml-list] Re: [oss-security] CVE request: Hash DoS vulnerability (ocert-2011-003) Dario Teixeira wrote: > Hi, > > > Basically I like the idea of "teaching" users this way. The typical > > user > > > will understand the impact, and act accordingly. Nevertheless, I would > > like it if it would be made as easy as possible to provide good seeds > > if required. The Random module is definitely not good enough (e.g. if > > you know when the program was started like for a cgi, and the cgi > > reveals information it should better not like the pid, the Random seed > > is made from less than 10 unpredictable bits, and on some systems even > 0 bits). > > > > The ideal would be to guide the user to the decision whether > > protection is necessary, and if the answer is yes, to give the > > instructions how to do it (and provide all means for it, of course). > > I think the problem may be in finding a good source of randomness that is > common across all OSes.  In Unixland this problem has largely been > solved: > pretty much everyone supports /dev/random and /dev/urandom.  Windows does > things differently, however. Does the source of randomness have to be common? The decision to use a random seed doesn't need to be limited by a problem getting a good cryptographically secure generator on a given OS - you'd simply document that the implementation on that particular OS doesn't seed with a good PRNG and await a patch from someone who may care in the future, but at least the philosophy behind the decision is correct! On Windows, as it happens, the situation is relatively easy (and it's not as even the Windows ports don't already have 1001 other workarounds and alternate methods in the runtime and standard library!): CryptGenRandom in the Crypto API or a neat little trick described in http://blogs.msdn.com/b/michael_howard/archive/2005/01/14/353379.aspx. David