Commit Graph

1018 Commits

Author SHA1 Message Date
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Dmitry Stogov
c67c166f93 Removed zend_fcall_info.symbol_table 2016-03-02 17:50:55 +03:00
Stanislav Malyshev
eaf4e77190 Fix bug #71610: Type Confusion Vulnerability - SOAP / make_http_soap_request() 2016-02-21 23:45:57 -08:00
Antony Dovgal
c140bbb5db check for NULL and avoid crashes 2016-01-25 14:30:33 +03:00
Anatol Belski
33cc42d8a5 port 4308c868f9 to 7.0 2016-01-14 18:38:30 +01:00
Anatol Belski
4308c868f9 Fixed bug #70979 crash with bad soap request
The error handler is overloaded with the SOAP one. However the SOAP
handler eventually wants to access some of its globals. This won't
work as long as the SOAP globals aren't initialized. The use case
is when an error is thrown before RINIT went through. As the call
order is arbitrary, the safest is to wait when all the modules
called their RINIT.
2016-01-14 17:42:28 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
4531d2c591 Fixed typo 2015-12-21 18:12:57 +08:00
Xinchen Hui
5df6f9f20e Fixed bug #70993 (Array key references break argument processing) 2015-11-30 10:50:23 +08:00
Remi Collet
6680c2b22e Fixed bug #70940 Segfault in soep / type_to_string 2015-11-19 08:18:13 +01:00
Dmitry Stogov
04526093e4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #70900 (SoapClient systematic out of memory error)
2015-11-12 20:36:39 +03:00
Dmitry Stogov
f8bf9bd86b Fixed bug #70900 (SoapClient systematic out of memory error) 2015-11-12 20:31:52 +03:00
Matteo Beccati
c263dcee2f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #70875 Segmentation fault if wsdl has no targetNamespace attribute
2015-11-07 11:05:36 +01:00
Matteo Beccati
fd61666d96 Fix bug #70875 Segmentation fault if wsdl has no targetNamespace attribute 2015-11-07 11:00:33 +01:00
Dmitry Stogov
c67fc6bb09 Fixed memory leak in php_stream_context_set_option() 2015-10-29 20:06:55 +03:00
Xinchen Hui
88a69ffa58 Fixed bug #70715 (Segmentation fault inside soap client) 2015-10-15 18:46:57 +08:00
Xinchen Hui
a2cfcdfbe9 Fixed bug #70709 (SOAP Client generates Segfault) 2015-10-15 10:19:43 +08:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Dmitry Stogov
57575c0898 Cleanup: avoid reallocations 2015-09-24 01:35:16 +03:00
Dmitry Stogov
5cccd6c5b6 Fixed memory leak and avoid reallocations 2015-09-24 01:19:15 +03:00
Stanislav Malyshev
9b1a224d4e Merge branch 'PHP-5.6'
* PHP-5.6: (21 commits)
  fix unit tests
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix bug ##70284 (Use after free vulnerability in unserialize() with GMP)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  ...

Conflicts:
	ext/exif/exif.c
	ext/gmp/gmp.c
	ext/pcre/php_pcre.c
	ext/session/session.c
	ext/session/tests/session_decode_variation3.phpt
	ext/soap/soap.c
	ext/spl/spl_observer.c
	ext/standard/var.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/xsl/xsltprocessor.c
2015-09-02 00:37:20 -07:00
Stanislav Malyshev
c19d59c550 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/zip/php_zip.c
2015-09-01 12:06:41 -07:00
Stanislav Malyshev
33d3acaae7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	configure.in
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_version.h
2015-09-01 11:42:19 -07:00
Stanislav Malyshev
e201f01ac1 Fix bug #70388 - SOAP serialize_function_call() type confusion 2015-08-31 21:06:03 -07:00
Anatol Belski
150dead2d9 add range check to ext/soap 2015-08-26 16:39:54 +02:00
Stanislav Malyshev
ed709d5aa0 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  fix test
  update NEWS
  Fix bug #70019 - limit extracted files to given directory
  Do not do convert_to_* on unserialize, it messes up references
  Fix #69793 - limit what we accept when unserializing exception
  Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
  Fixed bug #70166 - Use After Free Vulnerability in unserialize() with SPLArrayObject
  ignore signatures for packages too
  Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
  Fixed bug #69892
  Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes
  Improved fix for Bug #69441
  Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
  Fix bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
  Fix bug #70081: check types for SOAP variables

Conflicts:
	ext/soap/php_http.c
	ext/spl/spl_observer.c
2015-08-04 15:29:13 -07:00
Stanislav Malyshev
69ed3969dd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #70019 - limit extracted files to given directory
  Do not do convert_to_* on unserialize, it messes up references
  Fix #69793 - limit what we accept when unserializing exception
  Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
  Fixed bug #70166 - Use After Free Vulnerability in unserialize() with SPLArrayObject
  ignore signatures for packages too
  Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
  Fixed bug #69892
  Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes
  Improved fix for Bug #69441
  Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
  Fix bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
  Fix bug #70081: check types for SOAP variables

Conflicts:
	.gitignore
	ext/date/php_date.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
2015-08-04 14:10:57 -07:00
Stanislav Malyshev
c96d08b272 Fix bug #70081: check types for SOAP variables 2015-07-26 16:44:18 -07:00
Xinchen Hui
be54eb7db1 Fixed bug #70211 (php 7 ZEND_HASH_IF_FULL_DO_RESIZE use after free) 2015-08-10 17:02:16 +08:00
Anatol Belski
07f8845205 fix datatype 2015-08-07 10:12:20 +02:00
Stanislav Malyshev
97047e7665 Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  fix test
  update NEWS
  Fix bug #70019 - limit extracted files to given directory
  Do not do convert_to_* on unserialize, it messes up references
  Fix #69793 - limit what we accept when unserializing exception
  Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
  Fixed bug #70166 - Use After Free Vulnerability in unserialize() with SPLArrayObject
  ignore signatures for packages too
  Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
  Fixed bug #69892
  Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes
  Improved fix for Bug #69441
  Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
  Fix bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
  Fix bug #70081: check types for SOAP variables

Conflicts:
	Zend/zend_exceptions.c
	ext/date/php_date.c
	ext/openssl/openssl.c
	ext/phar/phar_internal.h
	ext/soap/php_http.c
	ext/spl/spl_array.c
	ext/spl/spl_dllist.c
	ext/spl/spl_observer.c
	ext/standard/tests/serialize/bug69152.phpt
	sapi/cli/tests/005.phpt
2015-08-04 16:14:24 -07:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Xinchen Hui
94e23b29a1 online test 2015-07-28 16:43:12 +08:00
Xinchen Hui
deeb6379cb Fixed bug #70079 (Segmentation fault after more than 100 SoapClient calls) 2015-07-16 18:32:42 +08:00
Xinchen Hui
0de0c4ace1 Fixed Bug #70032 (make_http_soap_request calls zend_hash_get_current_key_ex(,,,NULL)) 2015-07-09 16:36:31 +08:00
Aaron Piotrowski
fbcc823952 Remove E_EXCEPTION 2015-07-03 17:53:42 -05:00
Aaron Piotrowski
ed1b64877d Switch position of ce in exception ce variable names 2015-07-03 09:45:03 -05:00
Aaron Piotrowski
a812a74c2e Change zend_exception_get_default() to zend_exception_ce 2015-07-03 09:44:48 -05:00
Aaron Piotrowski
f9e9d3a437 Cleanup exception ce API
Removed recently added functions to get Error ce's and marked the old functions
fetching default_exception_ce and error_exception_ce as deprecated.
2015-07-03 09:44:30 -05:00
Dmitry Stogov
6daed13c8b Cleanup (removed dead code) 2015-07-01 22:18:40 +03:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Christoph M. Becker
95459a4d16 Merge branch 'PHP-5.6'
* PHP-5.6:
  slightly revised bug69462.phpt
  Test for bug #69462
2015-06-26 23:27:25 +02:00
Christoph M. Becker
bdf3bb668f slightly revised bug69462.phpt 2015-06-26 23:20:22 +02:00
Tomasz Sawicki
af17316fcd Test for bug #69462
Test scenario for already fixed bug #69462 with segmentation fault when
SoapVar XML node name was null.
2015-06-26 23:19:29 +02:00
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Kalle Sommer Nielsen
db22946b25 Remove these old references to the DSP files we don't use anymore 2015-06-22 13:29:42 +02:00
Aaron Piotrowski
110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Nikita Popov
5d3cf577aa Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.

All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).

What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.

Also fixes bug #69788.
2015-06-11 23:23:57 +02:00
Aaron Piotrowski
26b35cab46 Make zend_get_exception_base static.
Soap extension can use other API functions.
2015-05-17 11:52:41 -05:00
Aaron Piotrowski
d042d08807 Remodel exceptions based on Throwable interface
Added Throwable interface that exceptions must
implement in order to be thrown. BaseException
was removed, EngineException renamed to
Error, and TypeException and ParseException
renamed to TypeError and ParseError. Exception
and Error no longer extend a common base
class, rather they both implement the Throwable
interface.
2015-05-16 15:30:59 -05:00
Anatol Belski
becfdeb2ff improve searchability for libxml2 headers
and bring the configs inline with the current libxml2 build
2015-05-10 22:22:03 +02:00
Anatol Belski
f22a5bd710 fix timezone usage in soap for vc14 2015-05-10 22:22:01 +02:00
Nikita Popov
40e465e357 Clean up some type conversions
While at it also fix some type checks in iconv and drop dead and
unported code in standard/filters.
2015-04-27 18:50:08 +02:00
Dmitry Stogov
15a5f61cf4 Use fast method to check if first arguments should be passed by reference (not tested onbig endian). 2015-04-22 21:46:13 +03:00
Dmitry Stogov
3037665f04 Fixed use after free 2015-04-14 16:42:02 +03:00
Remi Collet
ff70b40dc9 fix type in fix for #69085 2015-04-13 14:41:39 +02:00
Remi Collet
dc0f2a5bad Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix type in fix for #69085
2015-04-13 14:40:43 +02:00
Remi Collet
c61ceef779 fix type in fix for #69085
(cherry picked from commit 085e9ddc26f37ce556b8fd787044746e726264b2)
2015-04-13 14:40:05 +02:00
Xinchen Hui
f23f7dfed0 Use new macros 2015-04-08 14:30:47 +08:00
Nikita Popov
6ef9216269 Finish PHP 4 constructor deprecation 2015-03-31 17:55:27 +02:00
Andrea Faulds
db76b708cf Deprecate PHP 4 constructors 2015-03-31 17:55:27 +02:00
Dmitry Stogov
685ab95add Convert fatal errors on improper access to static properties into EngineExceptions 2015-03-31 16:35:27 +03:00
Dmitry Stogov
75f40ae1f3 Fixed bug #69293 2015-03-27 18:40:58 +03:00
Xinchen Hui
86bbacfd53 Merge branch 'PHP-5.5' into PHP-5.6 2015-03-25 12:09:35 +08:00
Xinchen Hui
76c1ec5e96 Bug #69293 NEW segfault when using SoapClient::__setSoapHeader (bisected, regression)
This was a typo introduced in c8eaca013a
2015-03-25 12:07:25 +08:00
Dmitry Stogov
0ce7b4c8c6 Removed unused functions 2015-03-24 23:40:20 +03:00
Anatol Belski
663074b6b1 cleanup mod version macros and mod defs, round x 2015-03-23 21:30:22 +01:00
Dmitry Stogov
ca783218e7 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #69152

Conflicts:
	ext/soap/soap.c
2015-03-19 11:54:56 +03:00
Dmitry Stogov
0c3de98368 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69152
2015-03-19 11:48:10 +03:00
Dmitry Stogov
9bdbc7490f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #69152
2015-03-19 11:42:49 +03:00
Dmitry Stogov
51856a76f8 Fixed bug #69152 2015-03-19 11:36:01 +03:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Dmitry Stogov
026b0adc50 Fixed memory leaks 2015-03-11 01:28:13 +03:00
Dmitry Stogov
1c94ff0595 Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7

Pending changes regarding naming of BaseException and whether it
should be an interface.
2015-03-09 14:01:32 +01:00
Reeze Xia
6cb3b941df Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Improve fix for bug 67741
  Added type checks
  Added type checks
2015-03-03 16:27:35 +08:00
Dmitry Stogov
143cc67282 Merge branch 'PHP-5.6'
* PHP-5.6:
  Added type checks
  Update NEWS

Conflicts:
	NEWS
	ext/soap/php_encoding.c
	ext/soap/soap.c
2015-03-03 10:56:11 +03:00
Dmitry Stogov
c433f19a6b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added type checks
2015-03-03 10:46:55 +03:00
Dmitry Stogov
b3ac352253 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added type checks
2015-03-03 10:45:07 +03:00
Dmitry Stogov
c8eaca013a Added type checks 2015-03-03 10:43:48 +03:00
Dmitry Stogov
dd50ed8a34 Merge branch 'PHP-5.6'
* PHP-5.6:
  Added type checks
  Fixed bug #67741 (auto_prepend_file messes up __LINE__)
  Check variable type before its usage as IS_ARRAY.
  Fixed a bug that header value is not terminated by '\0' when accessed through getenv().

Conflicts:
	ext/soap/php_encoding.c
	ext/soap/php_http.c
	ext/soap/soap.c
2015-03-03 10:19:12 +03:00
Dmitry Stogov
26827a0111 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added type checks
  Fixed bug #67741 (auto_prepend_file messes up __LINE__)
  Check variable type before its usage as IS_ARRAY.
  Fixed a bug that header value is not terminated by '\0' when accessed through getenv().
2015-03-03 09:59:32 +03:00
Dmitry Stogov
035d80523f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added type checks

Conflicts:
	ext/soap/soap.c
2015-03-03 09:52:21 +03:00
Dmitry Stogov
0c136a2abd Added type checks 2015-03-03 09:44:46 +03:00
Dmitry Stogov
d5248f67b5 Check variable type before its usage as IS_ARRAY. 2015-03-02 12:27:36 +03:00
Xinchen Hui
794a28832d Merge branch 'PHP-5.6'
Conflicts:
	ext/soap/soap.c
2015-02-27 23:35:37 +08:00
Xinchen Hui
86ba1a2444 Merge branch 'PHP-5.5' into PHP-5.6 2015-02-27 23:32:59 +08:00
Xinchen Hui
997b7e5630 Fixed bug #69085 (SoapClient's __call() type confusion through unserialize()). 2015-02-27 23:32:32 +08:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Felipe Pena
abbc82f448 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  - Fix merge
  BFN
2015-02-16 13:09:52 -02:00
Felipe Pena
35a68c276d - Fix merge 2015-02-16 13:09:40 -02:00
Felipe Pena
e08bef442c - Fixed bug #67427 (SoapServer cannot handle large messages) patch by: brandt at docoloc dot de 2015-02-16 13:07:26 -02:00
Felipe Pena
a80ad10d9b - Fix merge 2015-02-16 12:21:20 -02:00
Felipe Pena
02de601ff8 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  - Fixed bug #67427 (SoapServer cannot handle large messages) patch by: brandt at docoloc dot de
  BFN
  Update NEWS
2015-02-16 12:08:39 -02:00
Felipe Pena
76a505f09b Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed bug #67427 (SoapServer cannot handle large messages) patch by: brandt at docoloc dot de
  Update NEWS
2015-02-16 12:08:26 -02:00
Felipe Pena
40c60b8212 - Fixed bug #67427 (SoapServer cannot handle large messages) patch by: brandt at docoloc dot de 2015-02-16 12:08:07 -02:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Xinchen Hui
136594822f Fixed use of uninitliazed pointer 2015-02-13 14:53:13 +08:00
Xinchen Hui
da7d94cd73 Merge branch 'PHP-5.6'
Conflicts:
	ext/soap/soap.c
	ext/standard/basic_functions.c
	ext/zlib/zlib.c
2015-02-13 13:28:24 +08:00