<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Bitstream Vera Sans">
<p>On Tuesday 01 May 2007 09:12:18 Jan Evert van Grootheest wrote:</p>
<p>&gt; &gt; On Friday 27 April 2007 13:44:46 Jan Evert van Grootheest wrote:</p>
<p>&gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; All,</p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; I think this got introduced in applets.c:check_suid with 17508 </p>
<p>&gt; &gt; &gt; &gt; &gt; 'accumulated post-1.4.0 fixes'.</p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; This part of the diff seems responsible.</p>
<p>&gt; &gt; &gt; &gt; &gt; -                        if ((sct-&gt;m_mode &amp; (S_ISGID | S_IXGRP)) </p>
<p>&gt; &gt; &gt; &gt; &gt; == (S_ISGID | S_IXGRP)) {     /* *both* have to be set </p>
<p>&gt; &gt; for sgid */</p>
<p>&gt; &gt; &gt; &gt; &gt; -                                xsetgid(sct-&gt;m_gid);</p>
<p>&gt; &gt; &gt; &gt; &gt; -                        } else xsetgid(rgid);                /* </p>
<p>&gt; &gt; &gt; &gt; &gt; no sgid -&gt; drop */</p>
<p>&gt; &gt; &gt; &gt; &gt; -</p>
<p>&gt; &gt; &gt; &gt; &gt; -                        if (sct-&gt;m_mode &amp; S_ISUID) </p>
<p>&gt; &gt; xsetuid(sct-&gt;m_uid);</p>
<p>&gt; &gt; &gt; &gt; &gt; -                        else xsetuid(ruid);                  /* </p>
<p>&gt; &gt; &gt; &gt; &gt; no suid -&gt; drop */</p>
<p>&gt; &gt; &gt; &gt; &gt; +                        if (sct-&gt;m_gid != 0) {</p>
<p>&gt; &gt; &gt; &gt; &gt; +                                /* _both_ have to be </p>
<p>&gt; &gt; set for sgid */</p>
<p>&gt; &gt; &gt; &gt; &gt; +                                if ((sct-&gt;m_mode &amp; (S_ISGID |</p>
<p>&gt; &gt; &gt; &gt; &gt; S_IXGRP)) == (S_ISGID | S_IXGRP)) {</p>
<p>&gt; &gt; &gt; &gt; &gt; +                                        xsetgid(sct-&gt;m_gid);</p>
<p>&gt; &gt; &gt; &gt; &gt; +                                } else xsetgid(rgid); /* no</p>
<p>&gt; &gt; &gt; &gt; &gt; sgid -&gt; drop */</p>
<p>&gt; &gt; &gt; &gt; &gt; +                        }</p>
<p>&gt; &gt; &gt; &gt; &gt; +                        if (sct-&gt;m_uid != 0) {</p>
<p>&gt; &gt; &gt; &gt; &gt; +                                if (sct-&gt;m_mode &amp; S_ISUID)</p>
<p>&gt; &gt; &gt; &gt; &gt; xsetuid(sct-&gt;m_uid);</p>
<p>&gt; &gt; &gt; &gt; &gt; +                                else xsetuid(ruid); /* no suid</p>
<p>&gt; &gt; &gt; &gt; &gt; -&gt; drop */</p>
<p>&gt; &gt; &gt; &gt; &gt; +                        }</p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; Previously if there was no sgid/suid, privileges would </p>
<p>&gt; &gt; always be </p>
<p>&gt; &gt; &gt; &gt; &gt; dropped. Now they're only dropped if the uid/gid in </p>
<p>&gt; &gt; bb.conf is not </p>
<p>&gt; &gt; &gt; &gt; &gt; 0.</p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; I would propose to revert this part of the patch.</p>
<p>&gt; &gt; &gt; &gt; &gt; Adding an else to call xsetuid/xsetgid would seem to do </p>
<p>&gt; &gt; the right </p>
<p>&gt; &gt; &gt; &gt; &gt; thing but, I guess, would only increase the size of the </p>
<p>&gt; &gt; &gt; &gt; &gt; executable.</p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; This seems, by the way, to be a security bug? It leaves </p>
<p>&gt; &gt; processes </p>
<p>&gt; &gt; &gt; &gt; &gt; with effective root all over!</p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; -- Jan Evert</p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; -----Oorspronkelijk bericht-----</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Van: busybox-bounces@busybox.net</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; [mailto:busybox-bounces@busybox.net] Namens Jan Evert van </p>
<p>&gt; &gt; &gt; &gt; Grootheest</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Verzonden: vrijdag 27 april 2007 9:07</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Aan: busybox@busybox.net</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Onderwerp: /etc/busybox.conf confusion</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Hi,</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; The confusion is mine (not bb).</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; If I have sh not in /etc/busybox.conf and I login as user</p>
<p>&gt; &gt; &gt; &gt; &gt; mysql I get</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; this:</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; viking-be# cat /proc/self/status | egrep &quot;id:|Name&quot;</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Name:   sh</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Tgid:   1192</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Pid:    1192</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; PPid:   1173</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; TracerPid:      0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Uid:    500     500     500     500</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Gid:    500     500     500     500</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; viking-be# cat /proc/1173/status | egrep &quot;id:|Name&quot;</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Name:   sh</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Tgid:   1173</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Pid:    1173</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; PPid:   1064</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; TracerPid:      0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Uid:    500     500     500     500</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Gid:    500     500     500     500</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Now, when I put sh in the busybox.conf file as using</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; sh      = xxx 0.0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; And login again and try the same this is the result </p>
<p>&gt; &gt; viking-be# </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; cat /proc/self/status | egrep &quot;id:|Name&quot;</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Name:   sh</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Tgid:   1206</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Pid:    1206</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; PPid:   1203</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; TracerPid:      0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Uid:    500     0       0       0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Gid:    500     0       0       0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; viking-be# cat /proc/1203/status | egrep &quot;id:|Name&quot;</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Name:   sh</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Tgid:   1203</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Pid:    1203</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; PPid:   1064</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; TracerPid:      0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Uid:    500     0       0       0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Gid:    500     0       0       0</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; I am confused, because I was expecting the same output. I </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; thought</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; that xxx meant that the applet is a regular executable </p>
<p>&gt; &gt; &gt; &gt; that doesn't</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; change effective uid and gid. But apparently it does?</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; So can anyone explain this?</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Which part of the process do I not understand?</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; My guess would be that the problem, if at all, is with</p>
<p>&gt; &gt; &gt; &gt; the starting</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; shell, because busybox is suid root and bb.conf is read during</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; startup.</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; This is a login via the bb telnetd (which is, of course,</p>
<p>&gt; &gt; &gt; &gt; running as</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; root) and using the bb login (which is xxx in</p>
<p>&gt; &gt; &gt; &gt; busybox.conf). And it</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; concerns bb 1.4.1 (with all patches, as far as I know)</p>
<p>&gt; &gt; &gt; &gt; using glibc</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; 2.3.6 on i386.</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Also note the 'Name' of cat. It is 'sh'. I would </p>
<p>&gt; &gt; guess this to </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; be</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; due to cat being a safe applet.</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Many thanks,</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt; Jan Evert</p>
<p>&gt; &gt; &gt; &gt; &gt; &gt;  </p>
<p>&gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; I think more changes are needed. Passwd and su are not really</p>
<p>&gt; &gt; &gt; &gt; behaving well:</p>
<p>&gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; I'm now trying to change the password of a regular user</p>
<p>&gt; &gt; &gt; &gt; (mysql). If I have the passwd applet in bb.conf as xxx it, </p>
<p>&gt; &gt; &gt; &gt; obviously, is not able to read /etc/shadow. If I have the </p>
<p>&gt; &gt; &gt; &gt; passwd applet in bb.conf as sxx then it attempts to change </p>
<p>&gt; &gt; &gt; &gt; the password of root. If I have the passwd applet in bb.conf </p>
<p>&gt; &gt; &gt; &gt; as sxx and attempt 'passwd mysql' when logged in as mysql, </p>
<p>&gt; &gt; &gt; &gt; then the correct password is changed, but without asking for </p>
<p>&gt; &gt; &gt; &gt; the old password!</p>
<p>&gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; Something comparable is happening to the su applet. When</p>
<p>&gt; &gt; &gt; &gt; executed as a regular user: With su as xxx, it asks for the </p>
<p>&gt; &gt; &gt; &gt; password and then fails to set groups. With su as sxx, it </p>
<p>&gt; &gt; &gt; &gt; doesn't ask for the password and drops straight into a shell </p>
<p>&gt; &gt; &gt; &gt; with the correct user (just as if root had executed it).</p>
<p>&gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; Any ideas?</p>
<p>&gt; &gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; &gt; Thanks,</p>
<p>&gt; &gt; &gt; &gt; Jan Evert</p>
<p>&gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; I think I figured it out.</p>
<p>&gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; A suid program has effective uid of the owner of the </p>
<p>&gt; &gt; program (usually </p>
<p>&gt; &gt; &gt; that will be root). And the real uid is the uid of the </p>
<p>&gt; &gt; logged in user </p>
<p>&gt; &gt; &gt; (for example, mysql). If a suid root program executes </p>
<p>&gt; &gt; setuid(x), the </p>
<p>&gt; &gt; &gt; real and effective uids are changed to become x. Same goes for gid.</p>
<p>&gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; And that is the bug. Busybox is suid root. If an applet is </p>
<p>&gt; &gt; supposed to </p>
<p>&gt; &gt; &gt; be suid, a setuid is done changing the real uid to root. Thus, for </p>
<p>&gt; &gt; &gt; example, su and passwd think they are executed by root and behave </p>
<p>&gt; &gt; &gt; differently! However, bb doesn't need to setuid because the </p>
<p>&gt; &gt; effective </p>
<p>&gt; &gt; &gt; uid is already root because the program is suid root.</p>
<p>&gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; So I came up with this patch which I think does the right </p>
<p>&gt; &gt; thing. This </p>
<p>&gt; &gt; &gt; is against 1.4.1.</p>
<p>&gt; &gt; &gt; </p>
<p>&gt; &gt; &gt; Thanks,</p>
<p>&gt; &gt; &gt; Jan Evert</p>
<p>&gt; &gt; &gt;  </p>
<p>&gt; &gt; </p>
<p>&gt; &gt; Hi,</p>
<p>&gt; &gt; this seems to work for me:</p>
<p>&gt; &gt; busybox.conf is</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; [SUID]</p>
<p>&gt; &gt; passwd = ssx 0.0</p>
<p>&gt; &gt; # applet su can be run by anyone and runs with euid=0/egid=0</p>
<p>&gt; &gt; su = ssx root.0 </p>
<p>&gt; &gt; # applet su can be run by anyone and runs with euid=0/egid=0</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; </p>
<p>&gt; &gt; root@localhost:~/Desktop/busybox# chown 0.0 /etc/busybox.conf</p>
<p>&gt; &gt; root@localhost:~/Desktop/busybox# chmod 600 /etc/busybox.conf </p>
<p>&gt; &gt;                                                        </p>
<p>&gt; &gt; root@localhost:~/Desktop/busybox# cp busybox /usr/bin/passwd</p>
<p>&gt; &gt; root@localhost:~/Desktop/busybox# chown 0.0 /usr/bin/passwd</p>
<p>&gt; &gt; root@localhost:~/Desktop/busybox# chmod 4755 /usr/bin/passwd</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; Running as normal user:</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; root@localhost:~/Desktop/busybox# cat /proc/18601/status</p>
<p>&gt; &gt; Name:   passwd</p>
<p>&gt; &gt; State:  S (sleeping)</p>
<p>&gt; &gt; SleepAVG:       88%</p>
<p>&gt; &gt; Tgid:   18601</p>
<p>&gt; &gt; Pid:    18601</p>
<p>&gt; &gt; PPid:   15912</p>
<p>&gt; &gt; TracerPid:      0</p>
<p>&gt; &gt; Uid:    1000    0 0     0</p>
<p>&gt; &gt; Gid:    1000    1000    1000    1000</p>
<p>&gt; &gt; FDSize: 256</p>
<p>&gt; &gt; Groups: 7 20 24 25 29 46 111 113 1000 1002 1003</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; tito@localhost:~$ id</p>
<p>&gt; &gt; uid=1000(tito) gid=1000(tito) </p>
<p>&gt; &gt; groups=7(lp),20(dip),24(cdrom),25(floppy),29(audio),46(plugdev</p>
<p>&gt; &gt; ),111(admin),113(fuse),1000(tito),1002(vboxusers),1003(halt)</p>
<p>&gt; &gt; tito@localhost:~$ /usr/bin/passwd</p>
<p>&gt; &gt; ruid = 1000 /*debug */</p>
<p>&gt; &gt; busybox.conf readable /*debug */</p>
<p>&gt; &gt; found su /*debug */</p>
<p>&gt; &gt; found passwd /*debug */</p>
<p>&gt; &gt; requested uid 0 gid 0 /*debug */</p>
<p>&gt; &gt; Changing password for tito</p>
<p>&gt; &gt; Old password:</p>
<p>&gt; &gt; New password:</p>
<p>&gt; &gt; Bad password: too weak</p>
<p>&gt; &gt; passwd: password for tito is unchanged</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; then changing busybox.conf to</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; [SUID]</p>
<p>&gt; &gt; passwd = ssx 0.0</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; tito@localhost:~$ /usr/bin/passwd</p>
<p>&gt; &gt; ruid = 1000</p>
<p>&gt; &gt; busybox.conf readable</p>
<p>&gt; &gt; found su</p>
<p>&gt; &gt; found passwd</p>
<p>&gt; &gt; requested uid 0 gid 0</p>
<p>&gt; &gt; Changing password for tito</p>
<p>&gt; &gt; Old password:</p>
<p>&gt; &gt; Incorrect password</p>
<p>&gt; &gt; passwd: password for tito is unchanged</p>
<p>&gt; &gt; tito@localhost:~$                                  </p>
<p>&gt; &gt; </p>
<p>&gt; &gt; </p>
<p>&gt; &gt; it is not possible to change password.</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; Running as root:</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; root@localhost:~/Desktop# cat /proc/18582/status</p>
<p>&gt; &gt; Name:   passwd</p>
<p>&gt; &gt; State:  S (sleeping)</p>
<p>&gt; &gt; SleepAVG:       58%</p>
<p>&gt; &gt; Tgid:   18582</p>
<p>&gt; &gt; Pid:    18582</p>
<p>&gt; &gt; PPid:   12012</p>
<p>&gt; &gt; TracerPid:      0</p>
<p>&gt; &gt; Uid:    0       0 0     0</p>
<p>&gt; &gt; Gid:    0       0 0     0</p>
<p>&gt; &gt; </p>
<p>&gt; &gt; root@localhost:~/Desktop# /usr/bin/passwd</p>
<p>&gt; &gt; ruid = 0 /* debug */</p>
<p>&gt; &gt; Changing password for root</p>
<p>&gt; &gt; New password:</p>
<p>&gt; &gt; Bad password: too weak</p>
<p>&gt; &gt; Retype password:</p>
<p>&gt; &gt; Passwords don't match</p>
<p>&gt; &gt; passwd: password for root is unchanged</p>
<p>&gt; &gt; root@localhost:~/Desktop#</p>
<p>&gt; </p>
<p>&gt; Tito, others,</p>
<p>&gt; </p>
<p>&gt; Sorry about this, but those su and passwd comments were with my initial</p>
<p>&gt; patch applied.</p>
<p>&gt; </p>
<p>&gt; With original code, it is easiest to demonstrate using 'cat</p>
<p>&gt; /proc/self/status' with a suid root bbox and as a regular user. Try both</p>
<p>&gt; with cat in bbox.conf as xxx and cat not present in bbox.conf.</p>
<p>&gt; When cat is present as xxx, privileges are not dropped.</p>
<p>&gt; </p>
<p>&gt; I ran into this because my environment had ash and sh as ssx in</p>
<p>&gt; bbox.conf. Which I changed to xxx. And then still had not proper</p>
<p>&gt; uids/gids.</p>
<p>&gt; </p>
<p>&gt; -- Jan Evert </p>
<p>Hi,</p>
<p>mv busybox /bin/busybox</p>
<p>chown 0.0 /bin/busybox</p>
<p>chmod 4755 /bin/busybox</p>
<p></p>
<p>1 ) not in busybox.conf:</p>
<p>        as normal user /bin/busybox cat /proc/self/status   does not work</p>
<p></p>
<p>2) in busybox.conf</p>
<p>2a)        as normal user and cat = ssx 0.0 in busybox.conf </p>
<p>        /bin/busybox cat /proc/self/status   works</p>
<p>        Name:   busybox</p>
<p>        State:  R (running)</p>
<p>        SleepAVG:       88%</p>
<p>        Tgid:   6937</p>
<p>        Pid:    6937</p>
<p>        PPid:   6416</p>
<p>        TracerPid:      0</p>
<p>        Uid:    1000    0       0       0</p>
<p>        Gid:    1000    1000    1000    1000</p>
<p></p>
<p>2b) as normal user and cat = xxx 0.0 in busybox.conf </p>
<p>        /bin/busybox cat /proc/self/status    does not work</p>
<p></p>
<p>        if in [SUID] stanza alphabetical order is respected</p>
<p>        [SUID]</p>
<p>        cat = xxx 0.0</p>
<p>        passwd = ssx 0.0</p>
<p>        # applet su can be run by anyone and runs with euid=0/egid=0</p>
<p>        su = ssx root.0</p>
<p>        # applet su can be run by anyone and runs with euid=0/egid=0</p>
<p></p>
<p>2c) as normal user and cat = xxx 0.0 in busybox.conf  it works</p>
<p>        </p>
<p>        /bin/busybox cat /proc/self/status    works</p>
<p></p>
<p>        if in [SUID] stanza alphabetical order is not respected</p>
<p>        [SUID]</p>
<p>        passwd = ssx 0.0</p>
<p>        # applet su can be run by anyone and runs with euid=0/egid=0</p>
<p>        su = ssx root.0</p>
<p>        # applet su can be run by anyone and runs with euid=0/egid=0</p>
<p>        cat = xxx 0.0</p>
<p></p>
<p>        Name:   busybox</p>
<p>        State:  R (running)</p>
<p>        SleepAVG:       58%</p>
<p>        Tgid:   6953</p>
<p>        Pid:    6953</p>
<p>        PPid:   6416</p>
<p>        TracerPid:      0</p>
<p>        Uid:    1000    0       0       0</p>
<p>        Gid:    1000    1000    1000    1000</p>
<p></p>
<p>Seems that there is really something wrong here....</p>
<p></p>
<p>IMHO check_suid and parse_config_file should be totally rewritten,</p>
<p>the first to make it more readable and the second to reduce the bloat as most of its features </p>
<p>are unused at the moment.</p>
<p></p>
<p>Ciao,</p>
<p>Tito</p>
<p></p>
</body></html>