1 |
W dniu pią, 22.09.2017 o godzinie 19∶15 +0200, użytkownik Alexis Ballier |
2 |
napisał: |
3 |
> On Fri, 22 Sep 2017 17:20:23 +0200 |
4 |
> Michał Górny <mgorny@g.o> wrote: |
5 |
> |
6 |
> > W dniu pią, 22.09.2017 o godzinie 12∶57 +0200, użytkownik Alexis |
7 |
> > Ballier napisał: |
8 |
> > > On Fri, 22 Sep 2017 06:07:18 +0200 |
9 |
> > > Michał Górny <mgorny@g.o> wrote: |
10 |
> > > |
11 |
> > > > W dniu czw, 21.09.2017 o godzinie 15∶41 -0700, użytkownik Matt |
12 |
> > > > Turner napisał: |
13 |
> > > > > On Thu, Sep 21, 2017 at 2:25 PM, Michał Górny |
14 |
> > > > > <mgorny@g.o> wrote: |
15 |
> > > > > > Given that sandbox is utterly broken by design, I don't really |
16 |
> > > > > > want to put too much effort in trying to make it a little |
17 |
> > > > > > better. I'd rather put the minimal effort required to make it |
18 |
> > > > > > not-much-worse. |
19 |
> > > > > |
20 |
> > > > > You said in your initial email that you weren't an expert in its |
21 |
> > > > > internals, but here you say it's broken by design. Why do you |
22 |
> > > > > think that? |
23 |
> > > > > |
24 |
> > > > |
25 |
> > > > Because it uses LD_PRELOAD which is a huge hack and which causes |
26 |
> > > > guaranteed issues we can't really fix. All we can do is disable |
27 |
> > > > it for emacs, for compiler-rt and I'm afraid this list will grow |
28 |
> > > > because overriding random library functions is never a good idea. |
29 |
> > > > |
30 |
> > > |
31 |
> > > I think we're all ears for a better solution. There are probably |
32 |
> > > much better ways to do sandboxing these days than 15 years ago. |
33 |
> > > |
34 |
> > > LD_PRELOAD does not work with static binaries. Hence the non |
35 |
> > > portable ptrace stuff. Hence bugs. Etc. The point is, that's the |
36 |
> > > best we have now. |
37 |
> > > |
38 |
> > |
39 |
> > I know of two obvious alternatives: ptrace and filesystem layer (e.g. |
40 |
> > FUSE). |
41 |
> > |
42 |
> > For the former, there's sydbox. I'm going to look into integrating it |
43 |
> > into Portage when I have more time. |
44 |
> |
45 |
> From: https://github.com/alip/pinktrace/blob/master/configure.ac |
46 |
> case "$host_cpu" in |
47 |
> i[[3456]]86|pentium) |
48 |
> x86?64*|amd64) |
49 |
> ia64) |
50 |
> powerpc64*) |
51 |
> powerpc*) |
52 |
> arm*) |
53 |
> [add support for those arches] |
54 |
> *) |
55 |
> AC_MSG_RESULT([NO!]) |
56 |
> AC_MSG_ERROR([Architecture $host_cpu is not supported by |
57 |
> pinktrace]) ;; |
58 |
> |
59 |
> sandbox keywords: |
60 |
> 2.11-r5:0: ~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc |
61 |
> ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd |
62 |
> |
63 |
> |
64 |
> Good luck adding the missing bits! |
65 |
> |
66 |
> |
67 |
> > For the latter, I have writing one in TODO. But I'm not sure when I'll |
68 |
> > have enough time to do work on it. |
69 |
> |
70 |
> Not sure how that would work, but you'll likely need some kind of |
71 |
> chroot/container since you don't want to trust a random binary ran as |
72 |
> root to respect environment variables. |
73 |
> |
74 |
|
75 |
Environment variables? What for? |
76 |
|
77 |
-- |
78 |
Best regards, |
79 |
Michał Górny |