About this list Date view Thread view Subject view Author view Attachment view

From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Sun 03 Apr 2005 - 17:55:06 BST


On Sun, Apr 03, 2005 at 06:43:58PM +0200, Enrico Scholz wrote:
> Hello,
>
> I discovered some irregularities regarding fakeinit functionality. The
> following program gives different output on host and vservers:
>
> | int main(int argc, char *argv[])
> | {
> | printf("%i\n", getsid(atoi(argv[1])));
> | }
>
> On host:
>
> | # ./a.out 1
> | 0
>
> on VServer:
>
> | # chcontext --xid 100 --flag fakeinit ./a.out 1
> | 7448
>
> This issue causes unexpected behaviour with SysV's 'killall5' which will
> kill the init-process also.
>
ah, excellent! I was suspecting something like that
but I had no test case for that ... will be fixed
in the next sub-release ...

> Btw, this test reveals a minor security leak: getsid(2) does not test if
> the pid is visible but gives out the correct result:
>
> | # chcontext --xid 100 --flag fakeinit ./a.out $$
> | 10461
>
> ('$$' expands to the pid of the bash invoking 'chcontext'). Ditto for
> getpgid(2).
>
> The used patch was vs1.9.5-rc4 on a 2.6.11.6 kernel.

btw, we should make a longer session about the userspace
kernel space interface (VServer ABI and API) because we
need to adjust/add some things to support some platforms

as a sidenote: util-vserver 0.30.205 fails on x86_64
when compiled with dietlibc 0.28/cvs/fc3 with a message
stating that the execvp is/was not permitted ...

some testing did show that noexec=off doesn't fix it ...
execvp() in a test program works quite fine (with diet)

TIA,
Herbert

> Enrico
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sun 03 Apr 2005 - 17:55:27 BST by hypermail 2.1.3