From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA08824; Sat, 28 Feb 2004 20:29:15 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA07670 for ; Sat, 28 Feb 2004 20:29:13 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i1SJTIIq020901 for ; Sat, 28 Feb 2004 20:29:18 +0100 Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1AxA99-0000Fs-00; Sat, 28 Feb 2004 19:29:11 +0000 Date: Sat, 28 Feb 2004 19:29:11 +0000 To: Thomas Fischbacher Cc: caml-list@inria.fr Subject: Re: [Caml-list] How to secure an OCaml server Message-ID: <20040228192911.GA950@redhat.com> References: <87llmnme9b.fsf@linux-france.org> <20040228165400.GA24495@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i From: Richard Jones X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 2004:99 0900,:01 yutaka:01 oiwa:01 catastrophe:01 runtime:01 hash:01 hashes:01 hashing:01 dbi:99 threads:01 arrays:01 arrays:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Feb 28, 2004 at 06:06:01PM +0100, Thomas Fischbacher wrote: > > On Sat, 28 Feb 2004, Richard Jones wrote: > > > On Sun, Feb 29, 2004 at 01:44:10AM +0900, Yutaka OIWA wrote: > > > Unlike C and C++, Objective Caml has strong builtin protection for > > > array boundary overflow. You can expect that inputs which usually > > > cause arbitrary code execution (like viruses and worms) do not cause > > > such catastrophe, but only make your programs report runtime exception > > > and then halt. > > > > Remember the corollary of having safe arrays is that people can DoS > > your server by opening a socket and writing .. and writing .. and > > writing. It's always a good idea to either implement your own > > sensible maximums on the length of strings / arrays, or at least run > > your module with a BSD resource-style limit (setrlimit(2)). > > Yes. Another interesting issue that frequently comes up in such situations > is provoking hash collisions. Yes, right! I forgot about that one, but it's very important. IIRC Perl 5.8.0 changed hashes so there is some randomness in the hashing function, which reduces the possibility of this sort of attack. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment PTHRLIB is a library for writing small, efficient and fast servers in C. HTTP, CGI, DBI, lightweight threads: http://www.annexia.org/freeware/pthrlib/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners