caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yamagata Yoriyuki <yoriyuki@mbg.ocn.ne.jp>
To: oiwa@yl.is.s.u-tokyo.ac.jp
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] How to secure an OCaml server
Date: Sun, 29 Feb 2004 08:16:51 +0900 (JST)	[thread overview]
Message-ID: <20040229.081651.39150923.yoriyuki@mbg.ocn.ne.jp> (raw)
In-Reply-To: <vfioerj9msl.fsf@tuba.is.s.u-tokyo.ac.jp>

From: Yutaka OIWA <oiwa@yl.is.s.u-tokyo.ac.jp>
Subject: Re: [Caml-list] How to secure an OCaml server
Date: Sun, 29 Feb 2004 01:44:10 +0900

> The garbage collection helps this style of programming, since with
> GC you can use those high-level data structures without fearing
> about memory leakage or dangling pointers.

On the other hand, relaying GC means data reside in the memory for
unpredictable amount of time, and may swap out to the disk.  Moreover,
current GC of OCaml does not seem to wipe out the contents when a
memory block is reclaimed, and String.create does not initialize the
contents either.  This could leak information which is otherwise
inaccessible.

So overwrite explicitly sensible data when they are no longer used,
and use String.make instead of String.create.

(Actually, I feel String.create is deprecated, or initializes the
contents by null, but there would be a performance concern.)

--
Yamagata Yoriyuki

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2004-02-28 23:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-28 15:10 David MENTRE
2004-02-28 16:37 ` David MENTRE
2004-02-28 16:44 ` Yutaka OIWA
2004-02-28 16:54   ` Richard Jones
2004-02-28 17:06     ` Thomas Fischbacher
2004-02-28 19:29       ` Richard Jones
2004-02-28 19:41       ` David MENTRE
2004-02-28 20:20         ` Richard Jones
2004-02-28 20:28           ` Thomas Fischbacher
2004-02-28 20:29             ` Richard Jones
2004-02-28 20:38               ` Thomas Fischbacher
2004-02-28 20:24         ` Thomas Fischbacher
2004-02-28 21:04           ` David MENTRE
2004-02-28 23:16   ` Yamagata Yoriyuki [this message]
2004-02-28 23:49     ` Thomas Fischbacher

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=20040229.081651.39150923.yoriyuki@mbg.ocn.ne.jp \
    --to=yoriyuki@mbg.ocn.ne.jp \
    --cc=caml-list@inria.fr \
    --cc=oiwa@yl.is.s.u-tokyo.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;
as well as URLs for NNTP newsgroup(s).