Re: [RFC] Capabilities still can't be inherited by normal programs
From: Serge E. Hallyn
Date: Tue Dec 04 2012 - 08:50:15 EST
Quoting Andy Lutomirski (luto@xxxxxxxxxxxxxx):
> >> d) If I really wanted, I could emulate execve without actually doing
> >> execve, and capabilities would be inherited.
> >
> > If you could modify the executable properties of the binary that has
> > the privilege to wield a privilege then you are either exploiting an
> > app bug, or doing something the privileged binary has been trusted to
> > do.
>
> That's not what I mean. I would:
>
> fork()
> munmap everything
> mmap ld.so
> set up a fake initial stack and the right fd or mapping or whatever
> just to ld-linux.so
>
> That's almost execve, and privilege inheritance works.
But of course that is why you only want to fill fI on programs you trust
not to do that. What you are arguing is that you want to give fI on
programs you don't trust anyway, and so heck why not just give it on
everything.
Anyway, implementing the features you want in a new module is encouraged,
so long as the behavior of existing module stays the same.
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/