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>

next in thread | raw e-mail | index | archive | help
--0000000000009d4b4705e1777804
Content-Type: text/plain; charset="UTF-8"

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.

--0000000000009d4b4705e1777804
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi,=C2=A0</div><div><br></div><div>I confirm that it =
happens=C2=A0on my setup as well.</div><div>Have you tried to build officia=
l PHP-8.1.6 instead=C2=A0using the one from ports? It seems it works.</div>=
<div><br>I tried=C2=A0with<br><br><span style=3D"font-family:monospace"><sp=
an style=3D"color:rgb(0,0,0)">freebsd:~/php-src # git status</span><br><spa=
n style=3D"color:rgb(178,24,24)">HEAD detached at=C2=A0</span><span style=
=3D"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=3D"font-family:mon=
ospace">freebsd:~/php-src #=C2=A0</span><span style=3D"color:rgb(0,0,0);fon=
t-family:monospace">./buildconf</span><br><span style=3D"font-family:monosp=
ace">freebsd:~/php-src #=C2=A0</span><span style=3D"font-family:monospace">=
<span style=3D"color:rgb(0,0,0)">./configure --without-iconv --enable-share=
d --with-apxs2</span></span></div><div><span style=3D"font-family:monospace=
">freebsd:~/php-src #=C2=A0</span><span style=3D"font-family:monospace"><sp=
an style=3D"color:rgb(0,0,0)">make -j4</span></span><br></div><div><span st=
yle=3D"font-family:monospace">freebsd:~/php-src #=C2=A0</span><span style=
=3D"font-family:monospace"><span style=3D"color:rgb(0,0,0)">make install</s=
pan></span></div><div><span style=3D"font-family:monospace"><span style=3D"=
color:rgb(0,0,0)"><br></span></span></div><div><span style=3D"font-family:m=
onospace"><span style=3D"color:rgb(0,0,0)"><br></span></span></div><div>Reg=
ards,</div><div>Wojtek</div><div><br></div><div><br></div>&gt;&gt;&gt;&gt;&=
gt;<br style=3D"color:rgb(0,0,0);font-family:&quot;Times New Roman&quot;;fo=
nt-size:medium"><pre style=3D"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=3D1
kern.elf32.aslr.pie_enable=3D1
kern.elf32.aslr.honor_sbrk=3D0
kern.elf64.aslr.enable=3D1
kern.elf64.aslr.pie_enable=3D1
kern.elf64.aslr.honor_sbrk=3D0

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

--0000000000009d4b4705e1777804--



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