From: "Gerd Stolpmann" <info@gerd-stolpmann.de>
To: <hamburg@fas.harvard.edu>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] Safe marshall?
Date: Thu, 17 Feb 2005 10:39:04 +0100 (CET) [thread overview]
Message-ID: <21947.192.168.0.1.1108633144.squirrel@gps.dynxs.de> (raw)
In-Reply-To: <059442cb47f5e19bca230316a6ae6261@fas.harvard.edu>
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
------------------------------------------------------------
next prev parent reply other threads:[~2005-02-17 9:39 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 [this message]
2005-02-17 23:14 ` Eric Stokes
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=21947.192.168.0.1.1108633144.squirrel@gps.dynxs.de \
--to=info@gerd-stolpmann.de \
--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