From: Richard Jones <rich@annexia.org>
To: Alex Baretta <alex@barettadeit.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Securely loading and running untrusted modules
Date: Tue, 5 Apr 2005 15:17:46 +0100 [thread overview]
Message-ID: <20050405141744.GA11816@furbychan.cocan.org> (raw)
In-Reply-To: <42529C01.2080609@barettadeit.com>
On Tue, Apr 05, 2005 at 04:09:05PM +0200, Alex Baretta wrote:
> alex@alex:~$ ocaml
> Objective Caml version 3.08.2
>
> # external pizza : 'a -> 'b = "%identity";;
> external pizza : 'a -> 'b = "%identity"
> # pizza 1 = "pasta";;
> Segmentation fault
Dynlink allows me to specify that modules can't use unsafe features,
so such declarations wouldn't be permitted.
A much more serious problem which I've just found is that _any_ module
(even the empty module) seems to require Pervasives. Thus it seems to
be impossible to create any OCaml code which could be loaded by
Dynlink where Dynlink.allow_only does not specify "Pervasives".
rich@arctor:/tmp$ rm test_module.ml
rich@arctor:/tmp$ touch test_module.ml
rich@arctor:/tmp$ ocamlc -c test_module.ml
rich@arctor:/tmp$ ocamlobjinfo test_module.cmo
File test_module.cmo
Unit name: Test_module
Interfaces imported:
71f888453b0f26895819460a72f07493 Pervasives
f7db4d58568a6e5a2cfe62ef59a52df1 Test_module
Uses unsafe features: no
rich@arctor:/tmp$ ./test
Dynlink: no implementation available for Pervasives
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
next prev parent reply other threads:[~2005-04-05 14:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-05 12:14 Richard Jones
2005-04-05 12:55 ` [Caml-list] " Nicolas Cannasse
2005-04-05 13:16 ` Richard Jones
2005-04-05 14:09 ` Alex Baretta
[not found] ` <42529C01.2080609@barettadeit.com>
2005-04-05 14:17 ` Richard Jones [this message]
2005-04-05 14:36 ` Jacques Garrigue
2005-04-05 20:58 ` sejourne_kevin
2005-04-05 21:02 ` Jacques Garrigue
2005-04-06 7:59 ` sejourne_kevin
2005-04-05 14:38 ` Virgile Prevosto
2005-04-05 14:40 ` Daniel Bünzli
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=20050405141744.GA11816@furbychan.cocan.org \
--to=rich@annexia.org \
--cc=alex@barettadeit.com \
--cc=caml-list@inria.fr \
/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