From: sejourne_kevin <sejourne_kevin@yahoo.fr>
To: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Securely loading and running untrusted modules
Date: Tue, 05 Apr 2005 20:58:29 +0000 [thread overview]
Message-ID: <4252FBF5.1030509@yahoo.fr> (raw)
In-Reply-To: <20050405.233631.126985691.garrigue@math.nagoya-u.ac.jp>
Jacques Garrigue a écrit :
> From: Richard Jones <rich@annexia.org>
>
>>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".
>
>
> This is why there is a compiler option named -nopervasives.
> Basically your approach is right. If you compile the .ml files
> yourself, this is safe, as long as there is no bug in the compiler.
> Since there are certainly some, you have to follow messages on the
> list and upgrade the compiler when needed, as for any security
> issue...
>
> Jacques Garrigue
I can't find the way to use 'nopervasives' correctly, here is my test:
test.ml :
----------------
struct Pervasives = struct
(* Here the code steal from pervasives.ml *)
end;;
open Pervasives;;
print_endline "hello world";;
----------------
[20:55:58 ~] ocamlc -nopervasives -o test test.ml
[20:56:25 ~] ./test
hello world
[20:56:28 ~]
strange....
Kévin.
next prev parent reply other threads:[~2005-04-05 18:48 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
2005-04-05 14:36 ` Jacques Garrigue
2005-04-05 20:58 ` sejourne_kevin [this message]
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=4252FBF5.1030509@yahoo.fr \
--to=sejourne_kevin@yahoo.fr \
--cc=caml-list@inria.fr \
--cc=garrigue@math.nagoya-u.ac.jp \
/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