From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8D74FBC75 for ; Thu, 17 Feb 2005 01:11:10 +0100 (CET) Received: from us25.unix.fas.harvard.edu (us25.unix.fas.harvard.edu [140.247.35.201]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1H0B9ji003434 for ; Thu, 17 Feb 2005 01:11:10 +0100 Received: from [140.247.161.104] (roam161-104.student.harvard.edu [140.247.161.104]) by us25.unix.fas.harvard.edu (8.12.11/8.12.11) with ESMTP id j1H0B45M013986; Wed, 16 Feb 2005 19:11:04 -0500 In-Reply-To: <20050216225534.GA556@first.in-berlin.de> References: <059442cb47f5e19bca230316a6ae6261@fas.harvard.edu> <20050216225534.GA556@first.in-berlin.de> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <2e5e99be112833192813a47498863ed2@fas.harvard.edu> Content-Transfer-Encoding: 7bit Cc: caml-list@yquem.inria.fr From: Mike Hamburg Subject: Re: [Caml-list] Safe marshall? Date: Wed, 16 Feb 2005 19:11:03 -0500 To: Oliver Bandel X-Mailer: Apple Mail (2.619.2) X-Miltered: at nez-perce with ID 4213E11D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 oliver:01 bandel:01 wrote:01 wrote:01 type-safe:01 marshaling:01 marshaled:01 computed:01 c-interface:01 ocaml:01 imho:01 oliver:01 caml-list:01 beginner's:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: I don't know of any way to tell a C function typing information. Maybe with GCaml, but I haven't seen a new version of that in a long time. Even to get such information from within Caml sounds dubious; it seems like a Haskell-type-class-esque solution would be needed. Anyway, is the Objective-C serialization safe? This sounds unlikely to me... Mike On Feb 16, 2005, at 5:55 PM, Oliver Bandel wrote: > On Wed, Feb 16, 2005 at 05:07:55PM -0500, Mike Hamburg wrote: >> Is there any way to call Marshall in a type-safe way? I need to use >> marshaling for a networking program, and I'd rather not leave Marshal >> as an arbitrary code execution vulnerability (which it is as far as I >> can tell: switching on a Marshaled value should produce a computed >> jump, which can be set by an attacker to point to an arbitrary place). >> Am I stuck writing my own marshal function? > > Is it possible to say a C-function *anything* about a datastructure's > structure? > Via the C-interface of OCaml?! > > If so.... at least under Mac OS-X it should be possible to solve that > task > with Objective-C. It can dump objects completely. > > So this - at least on this platform - would be possible then. > > But IMHO this may not be possible with all Objective-C implementations. > > Ciao, > Oliver > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >