From: Rob Landley <rob@landley.net>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] The source to that firmware-uml thing is now up...
Date: Mon, 2 May 2005 01:14:29 -0400 [thread overview]
Message-ID: <200505020114.29408.rob@landley.net> (raw)
In-Reply-To: <200505011306.39277.blaisorblade@yahoo.it>
On Sunday 01 May 2005 07:06 am, Blaisorblade wrote:
> > (That said, if you do use -p to get get a setuid bash, there's several
> > other things you should do to make this marginally less dangerous. And I
> > wouldn't trust myself to remember them all off the top of my head...)
>
> No, I'm not saying that a setuid bash won't work because of the bash
> special code.
>
> I'm saying that setuid script plain don't work (the kernel ignores the
> setuid bit). Except for perl, which has a special mechanism to make them
> work anyway.
I got this to work once, a few years back (under an early 2.4 kernel). The
setuid bit wasn't on the bash executable (that would be insane), it was on
the script.
I don't remember the details (it was a few years ago now) but at one point it
was possible. I vaguely remember tracing through both bash and the kernel
code to see what the heck it was actually doing, and I think there was
something funky and non-obvious about permissions, or some such...
And if the perl executable isn't itself suid, then what special mechanism can
the perl executable have to execute stuff as root if the kernel isn't passing
it root access when you run the script? This "special mechanism" would
either have to be the suid bit on the perl executable (which my /usr/bin/perl
hasn't got) or some mechanism for cracking root access as a normal user,
doesn't it?
No, if I remember correctly bash was the problem, in the same holier than thou
"we are the FSF, we know better than you because you are dumb and we must
protect you from yourself" way that gcc's collect2 won't search the path for
ld if the $PATH has "." in it (even at the end), which is the default path in
UML by the way. (That took a while to track down...)
> > That said, I wasn't thinking of using bash for the wrapper but either
> > python or C. It's just easier to secure them...
>
> Ok, for C no problem. No idea if python supports a similar trick.
I got that to work once too. I vaguely recall I had to specify -E, and
possibly some other stuff...
Rob
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-05-02 6:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 10:06 [uml-devel] The source to that firmware-uml thing is now up Rob Landley
2005-04-23 12:57 ` Blaisorblade
2005-04-27 1:23 ` Rob Landley
2005-04-29 19:16 ` Blaisorblade
2005-04-28 23:38 ` Rob Landley
2005-05-01 11:06 ` Blaisorblade
2005-05-02 5:14 ` Rob Landley [this message]
2005-05-02 19:38 ` Blaisorblade
2005-04-24 23:20 ` Henrik Nordstrom
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=200505020114.29408.rob@landley.net \
--to=rob@landley.net \
--cc=blaisorblade@yahoo.it \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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