Subject: [Midnightbsd-kernel] systrace, still under development?

From: Thorsten Glaser <[email-masked]>
Date: Sun, 28 Sep 2008 12:16:21 +0000 (UTC)

Hello Niels,

do you still do any work on systrace, now that the clueless NetBSD®
developers have removed it? I’ve been pulling from OpenBSD, and I
hope they will not follow. We are using systrace in our ports frame-
work to confine buggy build systems, like OpenBSD optionally offers,
except we have enabled it by default. I’m also using it to confine
the base system (plus gcc and XFree86®) builds, although, there are
less problems than with especially unknown/new ports.

Since I’m also a developer at the FreeWRT project, I’d be interested
in systrace support on more recent GNU/Linux and Mac OSX systems.
While I do not have a Macintosh, if remote access were enough for
you I’m sure I can ask one of the many people I know who have one if
they can provide you access.

As for GNU/Linux, if you do not have access to a system, I’m sure
that could be arranged.

I’m not a kernel developer, so I probably can’t be of any help with
real implementation issues.

Lucas: do you plan on supporting systrace in MidnightBSD, for example
use it in mports similar to how we do in MirPorts?

Now to clean up some FUD for these on the Cc list: some sources state
that NetBSD® has removed systrace because of unpatched security prob-
lems: when using systrace to “jail” applications, they can break out
of it due to concurrency issues with threads or something. However,
systrace has many more uses, for example, sysjail (which was developed
to emulate FreeBSD® jails – which, for the record, are not 100% secure
either – originally) can emulate other OS kernels similar to the in-
kernel compat_linux(8) ABI emulation with systrace. I mostly use it to
confine build systems, for example, to prevent configure scripts from
phoning home, or Makefiles to wreck /usr/bin/ on installation and in-
stead write to ${DESTDIR}. So, if you know that systrace is no jail or
chroot tool, at least not 100% safe, you can see its other uses.

Interestingly enough, the sysjail homepage states that it should not
be used for security purposes but will be continued to be updated.

I wonder if TNF will some day see the light…

References:
• http://www.citi.umich.edu/u/provos/systrace/
• http://sysjail.bsd.lv/

bye,
//mirabilos
-- 
> Hi, does anyone sell openbsd stickers by themselves and not packaged
> with other products?
No, the only way I've seen them sold is for $40 with a free OpenBSD CD.
	-- Haroon Khalid and Steve Shockley in gmane.os.openbsd.misc

---

From: Lucas Holt <[email-masked]>
Date: Mon, 29 Sep 2008 23:14:36 -0400

> use it in mports similar to how we do in MirPorts?

<snip>

ctriv@ and I discussed this in detail today.  We don't see a need for  
systrace with mports.  We build packages on magus to test them in a  
chroot environment and compare the differences after compilation.  It  
seems to work for us.  While I can see uses for systrace, it isn't a  
priority for us to integrate it into MidnightBSD at this time.  If  
someone wanted to submit a patchset, we'd gladly take it.

Lucas Holt
[email-masked]
________________________________________________________
MidnightBSD.org (Free OS)
JustJournal.com (Free blogging)

---

From: Thorsten Glaser <[email-masked]>
Date: Sun, 26 Oct 2008 05:22:00 +0000 (UTC)

Niels Provos dixit:

>Hi Thorsten,
>
>my apologies for not getting back to you earlier; I am only slowly
>getting back to my email.

Don’t worry, better late than never ☺

>   I still develop Systrace at
>
> http://code.google.com/p/systrace/

Ah, good to know. I’ll have a look at it later.

>However, work tends to keep me fairly busy, and I can only devote a
>small amount of time to my open source projects.

Same here…

>For Linux, I developed a ptrace backend that is not very secure, but
>is sufficient for sandboxing untrusted applications such as Firefox
>running over Tor.  Ideally, there would be a kernel interface in Linux
>that has the capabilities required by Systrace, but I am not aware of
>such a thing.

While I thought of an LKM doing /dev/systrace, this certainly meets
the needs of what I’m doing with systrace on BSD at the moment.
So, again, I’ll have a look into it sometime.

Thanks!

bye,
//mirabilos
-- 
  "Using Lynx is like wearing a really good pair of shades: cuts out
   the glare and harmful UV (ultra-vanity), and you feel so-o-o COOL."
                                         -- Henry Nelson, March 1999

---

From: "Niels Provos" <[email-masked]>
Date: Sat, 25 Oct 2008 21:45:53 -0700

Hi Thorsten,

my apologies for not getting back to you earlier; I am only slowly
getting back to my email.   I still develop Systrace at

Anyway, let me know if I can help somehow.

Niels.