Bug #77869 [NEW]: Core dump when using server controls
| From: | alec@php.net | Date: | Tue, 09 Apr 2019 11:45:11 +0000 |
| Subject: | Bug #77869 [NEW]: Core dump when using server controls | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-220380@lists.php.net to get a copy of this message | ||
From: alec
Operating system:
PHP version: 7.3.4
Package: LDAP related
Bug Type: Bug
Bug description:Core dump when using server controls
Description:
------------
I'm using PHP 7.3.3-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 7
2019 20:31:49) ( NTS )
Provided script dumps core on ldap_parse_result() call. I'm testing vlv
controls features with server controls support added in 7.3. If you see
the script, my control values are BER-encoded. They were working fine
with the old-patch approach using ldap_parse_virtuallist_control(). The
values are generated with methods used in Kolab's LDAP library from
https://git.kolab.org/diffusion/PNL/browse/master/lib/Net/
Test script:
---------------
$controls = array (
array (
'oid' => '1.2.840.113556.1.4.473',
'value' =>
base64_decode('MCgwDQQLZGlzcGxheW5hbWUwBAQCc24wCwQJZ2l2ZW5uYW1lMAQEAmNu'),
),
array (
'oid' => '2.16.840.1.113730.3.4.9',
'value' => base64_decode('MA4CAQACAQGgBgIBAQIBAA=='),
'iscritical' => true,
),
);
$base_dn = 'ou=People,dc=example,dc=org';
$filter = '(objectClass=inetOrgPerson)';
$attrs = array (
0 => 'displayname',
1 => 'sn',
);
$conn = ldap_connect('ldap://192.168.56.101:389');
ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_bind($conn, 'cn=Directory Manager', '12345');
$ldap_result = ldap_search($conn, $base_dn, $filter, $attrs,
0, -1, -1, LDAP_DEREF_NEVER, $controls);
ldap_parse_result($conn, $ldap_result, $errcode, $matcheddn, $errmsg,
$referrals, $serverctrls);
Expected result:
----------------
No core dump, $serverctrls set.
Actual result:
--------------
Core dump.
--
Edit bug report at https://bugs.php.net/bug.php?id=77869&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77869&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77869&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77869&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77869&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77869&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77869&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77869&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77869&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77869&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77869&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77869&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77869&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77869&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77869&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77869&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77869&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77869&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77869&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77869&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77869&r=mysqlcfg