Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2022 09:28:33 +0200
From:      Wojciech Macek <wma@semihalf.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: Issue with php81-extensions and aslr FreeBSD
Message-ID:  <CANsEV8fdzRFXC38DZUB5cW4AkG97uYjSZbG57rWHyz0G%2B5Je-Q@mail.gmail.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hi,

I confirm that it happens on my setup as well.
Have you tried to build official PHP-8.1.6 instead using the one from
ports? It seems it works.

I tried with

freebsd:~/php-src # git status
HEAD detached at origin/PHP-8.1.6
nothing to commit, working tree clean
freebsd:~/php-src #
freebsd:~/php-src # ./buildconf
freebsd:~/php-src # ./configure --without-iconv --enable-shared --with-apxs2
freebsd:~/php-src # make -j4
freebsd:~/php-src # make install


Regards,
Wojtek


>>>>>

Running 13.1-RELEASE with everything installed from packages and aslr
enabled, apache24 will core dump on a graceful restart after installing
php81-extensions.

Start with apache24, php81 and mod_php81 installed
/usr/local/etc/rc.d/apache24 start
apache is running
/usr/local/etc/rc.d/apache24 graceful
apache is still running

Then install php81-extensions:

/usr/local/etc/rc.d/apache24 stop
pkg install php81-extensions
/usr/local/etc/rc.d/apache24 start
apache is running
/usr/local/etc/rc.d/apache24 graceful
kernel: pid 2122 (httpd), jid 0, uid 0: exited on signal 11 (core dumped)

This is with using all the default conf files.  If I disable aslr it works
fine.  I'm enabling aslr by adding these lines to /etc/sysctl.conf and
rebooting.

kern.elf32.aslr.enable=1
kern.elf32.aslr.pie_enable=1
kern.elf32.aslr.honor_sbrk=0
kern.elf64.aslr.enable=1
kern.elf64.aslr.pie_enable=1
kern.elf64.aslr.honor_sbrk=0

This is the first time I've tried enabling aslr so maybe I'm doing something
wrong.

[-- Attachment #2 --]
<div dir="ltr"><div>Hi, </div><div><br></div><div>I confirm that it happens on my setup as well.</div><div>Have you tried to build official PHP-8.1.6 instead using the one from ports? It seems it works.</div><div><br>I tried with<br><br><span style="font-family:monospace"><span style="color:rgb(0,0,0)">freebsd:~/php-src # git status</span><br><span style="color:rgb(178,24,24)">HEAD detached at </span><span style="color:rgb(0,0,0)">origin/PHP-8.1.6</span><br>nothing to commit, working tree clean<br>freebsd:~/php-src #<br></span><span style="font-family:monospace">freebsd:~/php-src # </span><span style="color:rgb(0,0,0);font-family:monospace">./buildconf</span><br><span style="font-family:monospace">freebsd:~/php-src # </span><span style="font-family:monospace"><span style="color:rgb(0,0,0)">./configure --without-iconv --enable-shared --with-apxs2</span></span></div><div><span style="font-family:monospace">freebsd:~/php-src # </span><span style="font-family:monospace"><span style="color:rgb(0,0,0)">make -j4</span></span><br></div><div><span style="font-family:monospace">freebsd:~/php-src # </span><span style="font-family:monospace"><span style="color:rgb(0,0,0)">make install</span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div>Regards,</div><div>Wojtek</div><div><br></div><div><br></div>&gt;&gt;&gt;&gt;&gt;<br style="color:rgb(0,0,0);font-family:&quot;Times New Roman&quot;;font-size:medium"><pre style="white-space:pre-wrap;width:3824px;overflow-x:auto;color:rgb(0,0,0)">Running 13.1-RELEASE with everything installed from packages and aslr
enabled, apache24 will core dump on a graceful restart after installing
php81-extensions.

Start with apache24, php81 and mod_php81 installed
/usr/local/etc/rc.d/apache24 start
apache is running
/usr/local/etc/rc.d/apache24 graceful
apache is still running

Then install php81-extensions:

/usr/local/etc/rc.d/apache24 stop
pkg install php81-extensions
/usr/local/etc/rc.d/apache24 start
apache is running
/usr/local/etc/rc.d/apache24 graceful
kernel: pid 2122 (httpd), jid 0, uid 0: exited on signal 11 (core dumped)

This is with using all the default conf files.  If I disable aslr it works
fine.  I&#39;m enabling aslr by adding these lines to /etc/sysctl.conf and
rebooting.

kern.elf32.aslr.enable=1
kern.elf32.aslr.pie_enable=1
kern.elf32.aslr.honor_sbrk=0
kern.elf64.aslr.enable=1
kern.elf64.aslr.pie_enable=1
kern.elf64.aslr.honor_sbrk=0

This is the first time I&#39;ve tried enabling aslr so maybe I&#39;m doing something
wrong.</pre></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANsEV8fdzRFXC38DZUB5cW4AkG97uYjSZbG57rWHyz0G%2B5Je-Q>