Re: [Statifier-general] Problems with statifier and the CGI version of PHP
Tool for creating portable self-containing Linux executable
Brought to you by:
valery_reznic
From: Valery R. <val...@ya...> - 2008-09-11 11:59:01
|
--- On Wed, 9/10/08, sa...@us... <sa...@us...> wrote: > From: sa...@us... <sa...@us...> > Subject: [Statifier-general] Problems with statifier and the CGI version of PHP > To: sta...@li... > Date: Wednesday, September 10, 2008, 6:13 PM > Dear Srs, > > I'am try to to build a statically linked version of the > CGI PHP using > statifier v1.6.12, in a CentOS 4.6 i686 and default kernel > (2.6.9-42.0.3.ELsmp). > > It appears that works fine.. but I get some random > "Segmentation fault" > > # ./php-cgi.statifier -v > Segmentation fault > > That's the output of strace when running > statifier'd version of the CGI and > when gives a segfault: > > > Are those segmentation faults related with Linux kernel > stack > randomization? I'm using 2.6.9 kernel version and there > is no > /proc/sys/kernel/randomize_va_space, what maybe the > problem? > > I have found that if a disable /proc/sys/kernel/exec-shield > and > /proc/sys/kernel/exec-shield-randomize and re-exec > statifier the output > executable appears that is not affected by this. > Hi, Santi. > It's ok? If I disable exec-shield and > exec-shield-randomize before running > statifier, the problem is solved? thanks! OK, on the first glance you can think it's OK - your statified program is running without segfault. But on the second glance it's not so bright :((. I guess you statified php-cgi not for running it on the same Linux box, but for copying it to another(s), am I correct ? Now, we have following problems: > # ldd php-cgi > libgmp.so.3 => /usr/lib/sse2/libgmp.so.3 > libdb-4.2.so => /lib/tls/i686/libdb-4.2.so > (0xb7cda000) 1) Statified program required i686 to be executed (not too hard satisfy today) 2) Statified program required sse2 instruction set. Hmmm, I don't know how hard this requirement is. 3) CentOS use kernel vDSO. If you run statified executable on Linux distro without kernel vDSO or with vDSO randomization it will segfault. You can try Ermine (http://magicErmine.com). While this program is commercial it'ss free from those problems. Valery > > |