Bug 93274 - net/nss_ldap: nss_ldap & nss_mysql cause php to segfault
Summary: net/nss_ldap: nss_ldap & nss_mysql cause php to segfault
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-13 10:20 UTC by Chris van der Wel
Modified: 2006-08-04 12:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris van der Wel freebsd_committer freebsd_triage 2006-02-13 10:20:03 UTC
When PHP is resolving any hostname (valid or not) PHP is segfaulting. It only happens when nss_ldap or nss_mysql is enabled in /etc/nsswitch.conf

chris@hordeur: ~ $ cat /etc/nsswitch.conf
group: files ldap
group_compat: nis
hosts: files dns
networks: files
passwd: files ldap
passwd_compat: nis
shells: files

We reported this bug to PHP, but they say it'a a FreeBSD bug (see http://bugs.php.net/bug.php?id=36206)

Backtraces are available in the PHP bug report.

How-To-Repeat: Enable nss_ldap or nss_mysql and run something like

echo "<?php mysql_connect('bla','bla','bla'); ?>"|php
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-02-21 22:37:08 UTC
Responsible Changed
From-To: freebsd-i386->ale

Make this a ports PR and assign.
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2006-02-22 06:59:14 UTC
Responsible Changed
From-To: ale->nectar

If it's a nss bug instead of php bug, perhaps nectar can solve it 
better than me.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2006-03-24 05:49:01 UTC
Responsible Changed
From-To: nectar->freebsd-ports-bugs

Reset assignee; nectar is away from FreeBSD work at the moment.
Comment 4 thomas 2006-05-26 13:21:51 UTC
Datapoint: still occurs with php 5.1.4 (FreeBSD5.4, nss_ldap-1.239, 
openldap-client-2.3.21).

-- 
Thomas Sandford
Comment 5 Andrey Slusar freebsd_committer freebsd_triage 2006-06-14 14:31:58 UTC
Now nss_ldap-1.250 is available in ports tree, Please, try this
version and report results.

-- 
Andrey Slusar <anrays@gmail.com>
              <anray@FreeBSD.org>
Comment 6 thomas 2006-06-15 12:30:13 UTC
I'm no longer able to reproduce the crash using the "How-To-Repeat"
instructions in the bug report.

My current setup is: FreeBSD5.4 (with SMP kernel) php 5.1.4,
nss_ldap-1.250, openldap-client-2.3.21

[ie only likely significant change is upgrade from 1.239 to 1.250 in 
nss_ldap].

I'm continuing to have other random apache segfaults that only appear
to happen on PHP pages though - whether this is related to this bug or
not I don't know. Tracking of the crashes through use of a proxy indicates
that the crashes are on legitimate page accesses, not malicious activity 
[but
that they are not reproducible - ie the same page access as segfaulted on 
one
attempt will sail through on another].

-- 
Thomas Sandford
Comment 7 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-07-09 21:05:38 UTC
State Changed
From-To: open->closed

problem is belived to to be fixed by updating nssd_ldap to 1.250
Comment 8 Stephane D'Alu 2006-08-04 12:32:54 UTC
Using FreeBSD 6.1 with nss_ldap-1.251, php5-5.1.4 and openldap-*-2.3.24
The same probleme occurs: echo '<?php gethostbyname("toto") ?>' | php
result in a Segmentation fault