* Change in 'devshell' behaviour
@ 2013-04-19 14:52 Gary Thomas
2013-04-19 15:03 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Gary Thomas @ 2013-04-19 14:52 UTC (permalink / raw)
To: Yocto Project
CAUTION!! giant security hole awaits!
I've just discovered that recent Poky/Yocto runs 'devshell' as ROOT!
If I run 'bitbake SOME-RECIPE -c devshell' with a somewhat older
metadata (poky rev 09359e6ec00901abfe49157f1f9730117b4d284b)
the shell is run using my user id.
With a newer poky rev 90b98764555945a186562ca8d501a9585ce2b23f,
the shell runs as 'root'.
This change came with this revision:
commit 4dc31a327be1a506e78e1d028db08ceee22a216f
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Thu Mar 28 13:17:12 2013 +0000
base.bbclass: When we use fakeroot, also use it for devshell
Its generally useful for devshell to end up in the fakeroot environment. If
a user needs to exit it, PSEUDO_UNLOAD=1 <command> works, its usually
harder to enter the envionment.
[YOCTO #3374]
(From OE-Core rev: e6ffc747a8ca5142c9bc6fbd2b06b5808bb38b02)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Isn't this a horrible security flaw? Or is 'fakeroot' actually safe?
The change description doesn't tell me why it's "useful".
Whatever the case, to me at least it's very unnerving...
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Change in 'devshell' behaviour
2013-04-19 14:52 Change in 'devshell' behaviour Gary Thomas
@ 2013-04-19 15:03 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2013-04-19 15:03 UTC (permalink / raw)
To: Gary Thomas; +Cc: Yocto Project
On Fri, 2013-04-19 at 08:52 -0600, Gary Thomas wrote:
> CAUTION!! giant security hole awaits!
>
> I've just discovered that recent Poky/Yocto runs 'devshell' as ROOT!
>
> If I run 'bitbake SOME-RECIPE -c devshell' with a somewhat older
> metadata (poky rev 09359e6ec00901abfe49157f1f9730117b4d284b)
> the shell is run using my user id.
>
> With a newer poky rev 90b98764555945a186562ca8d501a9585ce2b23f,
> the shell runs as 'root'.
>
> This change came with this revision:
>
> commit 4dc31a327be1a506e78e1d028db08ceee22a216f
> Author: Richard Purdie <richard.purdie@linuxfoundation.org>
> Date: Thu Mar 28 13:17:12 2013 +0000
>
> base.bbclass: When we use fakeroot, also use it for devshell
>
> Its generally useful for devshell to end up in the fakeroot environment. If
> a user needs to exit it, PSEUDO_UNLOAD=1 <command> works, its usually
> harder to enter the envionment.
>
> [YOCTO #3374]
>
> (From OE-Core rev: e6ffc747a8ca5142c9bc6fbd2b06b5808bb38b02)
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> Isn't this a horrible security flaw? Or is 'fakeroot' actually safe?
> The change description doesn't tell me why it's "useful".
>
> Whatever the case, to me at least it's very unnerving...
I think the key word to look at here is "fake". You'll find you can't do
anything nasty to your system you couldn't do as your normal user
account and this is purely emulation.
This "root" context is the one do_install, do_populate_sysroot and other
tasks run under so that we can give files owners and permissions in the
packages. We chose to give it more visibility since its actually useful
for debugging several types of problems. For example, you can look
around the rootfs from the rootfs task and see real users as it would
get tarballed up.
You can get your normal shell back with "PSEUDO_UNLOAD=1 bash", which is
much easier than trying to get into the pseudo context in the first
place.
So please rest assured there is no security issue here.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-19 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 14:52 Change in 'devshell' behaviour Gary Thomas
2013-04-19 15:03 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.