|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-09-02 06:31 UTC] stas@php.net
-Assigned To:
+Assigned To: stas
[2016-09-02 06:31 UTC] stas@php.net
[2016-09-02 16:06 UTC] nguyenluan dot vnn at gmail dot com
[2016-09-13 04:12 UTC] stas@php.net
-Status: Assigned
+Status: Closed
[2016-09-13 04:12 UTC] stas@php.net
[2016-09-13 12:36 UTC] nguyenluan dot vnn at gmail dot com
[2016-09-13 16:59 UTC] stas@php.net
[2016-09-14 14:01 UTC] nguyenluan dot vnn at gmail dot com
[2017-02-13 01:25 UTC] stas@php.net
-Type: Security
+Type: Bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
Description: ------------ The ldap_escape function does NOT check for the MAX output string length. It can produce string larger than 2Gb. This string is considered invalid in PHP 5 and could lead to memory corruption when feed to other functions. Test script: --------------- <?php ini_set('memory_limit', -1); $str = str_repeat('a', 0x40000000).'\\\\\\\\'.str_repeat('+', 0x40000000 - 5); var_dump(strlen($str)); $str1 = ldap_escape($str, null, LDAP_ESCAPE_FILTER); var_dump(strlen($str1)); ?> Expected result: ---------------- Error, output string length larger than 2Gb Actual result: -------------- int(2147483647) int(-2147483641) // output string with length > 2Gb