caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eric Stokes <eric.stokes@csun.edu>
To: Mike Hamburg <hamburg@fas.harvard.edu>
Cc: "<caml-list@inria.fr>" <caml-list@inria.fr>
Subject: Re: [Caml-list] Safe marshall?
Date: Thu, 17 Feb 2005 15:14:30 -0800	[thread overview]
Message-ID: <9c3c426c52d70a19ad1dc3e3047a5138@csun.edu> (raw)
In-Reply-To: <21947.192.168.0.1.1108633144.squirrel@gps.dynxs.de>

I have to agree with Gerd, if at all possible use a protocol compiler 
such as XDR, or ASN.1, even signing might not be secure if your 
attacker can get ahold of the keys you are using. I can attest to the 
robustness of Gerd's XDR implementation, I have used it in several 
projects.

On Feb 17, 2005, at 1:39 AM, Gerd Stolpmann wrote:

> Mike Hamburg said:
>> 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?
>
> Marshal is not type-safe, no chance. I see three options for you:
>
> - If it is a closed protocol, you can sign the marshaled values
>
> - You can use other serializers. A quite simple and fast serializer is 
> the
>   XDR encoder in my SunRPC implementation (see
>   http://ocaml-programming.de/programming/rpc.html). Other options
>   I know are BER (see ocamldap), XML-RPC, SOAP, and Ensemble.
>
> - Write the serializer yourself. Maybe this is an option for you
>   if you need maximum performance.
>
> Gerd
> ------------------------------------------------------------
> Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
> gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
> ------------------------------------------------------------
>
>
>
> _______________________________________________
> 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
>


  reply	other threads:[~2005-02-17 23:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-16 22:07 Mike Hamburg
2005-02-16 22:55 ` [Caml-list] " Oliver Bandel
2005-02-17  0:11   ` Mike Hamburg
2005-02-18  5:26     ` Oliver Bandel
2005-02-17  9:39 ` Gerd Stolpmann
2005-02-17 23:14   ` Eric Stokes [this message]
2005-02-18  5:29     ` Oliver Bandel
2005-02-18  9:41       ` Gerd Stolpmann
2005-02-18 10:10         ` Gerd Stolpmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c3c426c52d70a19ad1dc3e3047a5138@csun.edu \
    --to=eric.stokes@csun.edu \
    --cc=caml-list@inria.fr \
    --cc=hamburg@fas.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).