]>
granicus.if.org Git - php/log
Nikita Popov [Wed, 10 Aug 2016 12:30:16 +0000 (14:30 +0200)]
Bug #72663 - part 2
If a (nested) unserialize() call fails, we remove all the values
that were inserted into var_hash during that call. This prevents
their use in other unserializations in the same context.
Nikita Popov [Mon, 8 Aug 2016 16:05:29 +0000 (18:05 +0200)]
Bug #72663 - part 1
Don't call __destruct() on an unserialized object that has a
__wakeup() method if either
a) unserialization of its properties fails or
b) the __wakeup() call fails (e.g. by throwing).
This basically treats __wakeup() as a form of constructor and
aligns us with the usual behavior that if the constructor call
fails the destructor should not be called.
The security aspect here is that people use __wakeup() to prevent
unserialization of objects with dangerous __destruct() methods,
but this is ineffective if __destruct() can still be called while
__wakeup() was skipped.
Stanislav Malyshev [Wed, 17 Aug 2016 07:23:51 +0000 (00:23 -0700)]
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: (24 commits)
Update NEWS
BLock test with memory leak
fix tests
Fix TSRM build
Fix bug #72850 - integer overflow in uuencode
Fixed bug #72849 - integer overflow in urlencode
Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
Fix bug #72838 - Integer overflow lead to heap corruption in sql_regcase
Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
Fix bug #72836 - integer overflow in base64_decode caused heap corruption
Fix for bug #72807 - do not produce strings with negative length
Fix for bug #72790 and bug #72799
Fix bug #72730 - imagegammacorrect allows arbitrary write access
Fix bug#72697 - select_colors write out-of-bounds
Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
Fix bug #72750: wddx_deserialize null dereference
Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack
Improve fix for #72663
Fix bug #70436: Use After Free Vulnerability in unserialize()
Fix bug #72749: wddx_deserialize allows illegal memory access
...
Conflicts:
Zend/zend_API.h
ext/bz2/bz2.c
ext/curl/interface.c
ext/ereg/ereg.c
ext/exif/exif.c
ext/gd/gd.c
ext/gd/tests/imagetruecolortopalette_error3.phpt
ext/gd/tests/imagetruecolortopalette_error4.phpt
ext/session/session.c
ext/snmp/snmp.c
ext/standard/base64.c
ext/standard/ftp_fopen_wrapper.c
ext/standard/quot_print.c
ext/standard/url.c
ext/standard/uuencode.c
ext/standard/var.c
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re
ext/wddx/tests/bug72790.phpt
ext/wddx/tests/bug72799.phpt
ext/wddx/wddx.c
sapi/cli/generate_mime_type_map.php
Stanislav Malyshev [Wed, 17 Aug 2016 06:52:22 +0000 (23:52 -0700)]
Merge branch 'PHP-7.0.10' into PHP-7.0
* PHP-7.0.10:
Fix bug #72749: wddx_deserialize allows illegal memory access
Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
fix tests
Fix bug#72697 - select_colors write out-of-bounds
Fix bug #72708 - php_snmp_parse_oid integer overflow in memory allocation
Fix bug #72730 - imagegammacorrect allows arbitrary write access
Fix bug #72750: wddx_deserialize null dereference
Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack
fix tests
add missing skipif section
Fix for bug #72790 and bug #72799
Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
Fix bug #72742 - memory allocator fails to realloc small block to large one
Use size_t for path length
Check for string overflow
Fix for bug #72782: mcrypt accepts only ints, so don't pass anything else
Fix bug #72674 - check both curl_escape and curl_unescape
Stanislav Malyshev [Wed, 17 Aug 2016 06:50:42 +0000 (23:50 -0700)]
Merge branch 'PHP-7.0' into PHP-7.0.10
* PHP-7.0: (34 commits)
Fix URL rewriter partially
Support "git worktree"
Add NEWS
Fix ASSERT logic
Bugfix 72791: fix memory leak in PDO persistent connections
Don't copy mime types in CLI server
Remove obsolete Id tags
Bump version in OCI8 test
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Replace dead branch with ZEND_ASSERT()
Add test for bug #69107: finfo no longer detects PHP files
Fix bug #55451
Fix stream_socket_enable_crypto() test
Remove old $Id$ tags
Sync with 7.1 branch changes from Nikita & Dimitri to keep OCI8 code identical
Fix bug #72524 (Binding null values triggers ORA-24816 error)
Fix the fix (Nikita), thanks!
Check the return value of dbconvert() in mssql_guid_string(), as it may return -1 in case the conversion failed. In that case false is returned.
...
Conflicts:
ext/standard/ftp_fopen_wrapper.c
Stanislav Malyshev [Wed, 17 Aug 2016 06:44:59 +0000 (23:44 -0700)]
Update NEWS
Stanislav Malyshev [Wed, 17 Aug 2016 05:49:06 +0000 (22:49 -0700)]
BLock test with memory leak
Stanislav Malyshev [Tue, 16 Aug 2016 23:47:53 +0000 (16:47 -0700)]
fix tests
Stanislav Malyshev [Tue, 16 Aug 2016 23:34:35 +0000 (16:34 -0700)]
Fix TSRM build
Stanislav Malyshev [Tue, 16 Aug 2016 23:03:44 +0000 (16:03 -0700)]
Fix bug #72850 - integer overflow in uuencode
Stanislav Malyshev [Tue, 16 Aug 2016 22:58:05 +0000 (15:58 -0700)]
Fixed bug #72849 - integer overflow in urlencode
Stanislav Malyshev [Tue, 16 Aug 2016 22:48:31 +0000 (15:48 -0700)]
Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
Stanislav Malyshev [Tue, 16 Aug 2016 06:43:59 +0000 (23:43 -0700)]
Fix bug #72838 - Integer overflow lead to heap corruption in sql_regcase
Stanislav Malyshev [Tue, 16 Aug 2016 06:17:26 +0000 (23:17 -0700)]
Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
Stanislav Malyshev [Mon, 15 Aug 2016 06:13:30 +0000 (23:13 -0700)]
Fix bug #72836 - integer overflow in base64_decode caused heap corruption
Stanislav Malyshev [Fri, 12 Aug 2016 06:36:25 +0000 (23:36 -0700)]
Fix for bug #72807 - do not produce strings with negative length
Stanislav Malyshev [Thu, 11 Aug 2016 06:43:56 +0000 (23:43 -0700)]
Fix for bug #72790 and bug #72799
Stanislav Malyshev [Wed, 10 Aug 2016 07:14:58 +0000 (00:14 -0700)]
Fix bug #72730 - imagegammacorrect allows arbitrary write access
Stanislav Malyshev [Wed, 10 Aug 2016 07:00:14 +0000 (00:00 -0700)]
Fix bug#72697 - select_colors write out-of-bounds
Stanislav Malyshev [Mon, 8 Aug 2016 07:49:34 +0000 (00:49 -0700)]
Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
Stanislav Malyshev [Sun, 7 Aug 2016 23:26:52 +0000 (16:26 -0700)]
Fix bug #72750: wddx_deserialize null dereference
Stanislav Malyshev [Sun, 7 Aug 2016 23:17:54 +0000 (16:17 -0700)]
Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack
Stanislav Malyshev [Sun, 7 Aug 2016 22:33:29 +0000 (15:33 -0700)]
Improve fix for #72663
Stanislav Malyshev [Sun, 7 Aug 2016 22:16:28 +0000 (15:16 -0700)]
Fix bug #70436: Use After Free Vulnerability in unserialize()
Stanislav Malyshev [Thu, 4 Aug 2016 07:17:42 +0000 (00:17 -0700)]
Fix bug #72749: wddx_deserialize allows illegal memory access
Stanislav Malyshev [Thu, 4 Aug 2016 07:03:31 +0000 (00:03 -0700)]
Update comment
Stanislav Malyshev [Thu, 4 Aug 2016 05:37:57 +0000 (22:37 -0700)]
Fix bug #72708 - php_snmp_parse_oid integer overflow in memory allocation
Stanislav Malyshev [Wed, 3 Aug 2016 07:30:12 +0000 (00:30 -0700)]
Fix bug #72681 - consume data even if we're not storing them
Stanislav Malyshev [Tue, 2 Aug 2016 08:08:42 +0000 (01:08 -0700)]
Fix bug #72663 - destroy broken object when unserializing
Xinchen Hui [Wed, 17 Aug 2016 03:16:48 +0000 (11:16 +0800)]
Unused var
Anatol Belski [Tue, 16 Aug 2016 23:37:40 +0000 (01:37 +0200)]
update NEWS
Christoph M. Becker [Tue, 16 Aug 2016 23:14:12 +0000 (01:14 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
Anatol Belski [Tue, 16 Aug 2016 22:56:19 +0000 (00:56 +0200)]
fix test
Anatol Belski [Tue, 16 Aug 2016 22:53:15 +0000 (00:53 +0200)]
fix blocking pipe stream option value
As revealed by #72857, this value conflicts with the xport option.
Wrong code can otherwise cause streams misbehave, fe if local and
network streams APIs are mixed.
Christoph M. Becker [Tue, 16 Aug 2016 22:41:31 +0000 (00:41 +0200)]
#72085: SEGV on unknown address zif_xml_parse
We better make sure that the ZVALs we're accessing as arrays are indeed
arrays.
Stanislav Malyshev [Thu, 4 Aug 2016 07:17:42 +0000 (00:17 -0700)]
Fix bug #72749: wddx_deserialize allows illegal memory access
(cherry picked from commit
659a21dc20f0b64dafd8cb16573059d3b45cce6b )
Conflicts:
ext/wddx/wddx.c
Anatol Belski [Tue, 16 Aug 2016 20:54:51 +0000 (22:54 +0200)]
fix test cleanup
Anatol Belski [Tue, 16 Aug 2016 20:47:50 +0000 (22:47 +0200)]
Fixed #72857 stream_socket_recvfrom read access violation
Nikita Popov [Tue, 16 Aug 2016 19:04:31 +0000 (21:04 +0200)]
Fix bug #72854
Stanislav Malyshev [Mon, 8 Aug 2016 07:49:34 +0000 (00:49 -0700)]
Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
(cherry picked from commit
620b01337cc39f856ca68c34c35e154f5f0682fc )
Conflicts:
ext/exif/exif.c
Anatol Belski [Tue, 16 Aug 2016 12:41:24 +0000 (14:41 +0200)]
fix tests
Anatol Belski [Tue, 16 Aug 2016 12:37:39 +0000 (14:37 +0200)]
Fix bug#72697 - select_colors write out-of-bounds
(cherry picked from commit
b6f13a5ef9d6280cf984826a5de012a32c396cd4 )
Conflicts:
ext/gd/gd.c
Stanislav Malyshev [Thu, 4 Aug 2016 05:37:57 +0000 (22:37 -0700)]
Fix bug #72708 - php_snmp_parse_oid integer overflow in memory allocation
(cherry picked from commit
c3f6d6da100c6451a540680504de4105b8bed83c )
Conflicts:
ext/snmp/snmp.c
main/php_version.h
Stanislav Malyshev [Wed, 10 Aug 2016 07:14:58 +0000 (00:14 -0700)]
Fix bug #72730 - imagegammacorrect allows arbitrary write access
(cherry picked from commit
047fe0ed03093a496691d376fcf51a7e2f1d04b0 )
Conflicts:
ext/gd/gd.c
Stanislav Malyshev [Sun, 7 Aug 2016 23:26:52 +0000 (16:26 -0700)]
Fix bug #72750: wddx_deserialize null dereference
(cherry picked from commit
6930a1d12c47aa1d2675837852910d177b0ceb11 )
Conflicts:
ext/wddx/wddx.c
Anatol Belski [Tue, 16 Aug 2016 11:08:24 +0000 (13:08 +0200)]
Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack
(cherry picked from commit
f9c2edb4dbc01a817989b70ca7726f177bb1a103 )
Conflicts:
ext/standard/ftp_fopen_wrapper.c
Anatol Belski [Tue, 16 Aug 2016 11:01:06 +0000 (13:01 +0200)]
fix tests
Anatol Belski [Tue, 16 Aug 2016 10:53:40 +0000 (12:53 +0200)]
add missing skipif section
Stanislav Malyshev [Thu, 11 Aug 2016 06:43:56 +0000 (23:43 -0700)]
Fix for bug #72790 and bug #72799
(cherry picked from commit
a14fdb9746262549bbbb96abb87338bacd147e1b )
Conflicts:
ext/wddx/wddx.c
Anatol Belski [Tue, 16 Aug 2016 10:34:25 +0000 (12:34 +0200)]
Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
Conflicts:
ext/bz2/bz2.c
Dmitry Stogov [Tue, 16 Aug 2016 08:44:22 +0000 (11:44 +0300)]
Fixed use after free
Christopher Jones [Tue, 16 Aug 2016 06:58:20 +0000 (16:58 +1000)]
Remove unused OCI8 macros
Xinchen Hui [Mon, 15 Aug 2016 15:22:55 +0000 (23:22 +0800)]
Fixed bug #72846 (getConstant for a array constant with constant values returns NULL/NFC/UKNOWN)
Stanislav Malyshev [Mon, 15 Aug 2016 02:07:15 +0000 (19:07 -0700)]
Fix bug #72742 - memory allocator fails to realloc small block to large one
Anatol Belski [Sun, 14 Aug 2016 20:39:01 +0000 (22:39 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
put missing prototype and fix ts build
Anatol Belski [Sun, 14 Aug 2016 20:35:01 +0000 (22:35 +0200)]
put missing prototype and fix ts build
Anatol Belski [Sun, 14 Aug 2016 18:52:47 +0000 (20:52 +0200)]
update NEWS
Anatol Belski [Sun, 14 Aug 2016 18:51:44 +0000 (20:51 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
update NEWS
Anatol Belski [Sun, 14 Aug 2016 18:50:23 +0000 (20:50 +0200)]
update NEWS
Anatol Belski [Sun, 14 Aug 2016 18:04:49 +0000 (20:04 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
Fixed bug #72759 Regression in pgo_pgsql
Anatol Belski [Sun, 14 Aug 2016 17:33:24 +0000 (19:33 +0200)]
Fixed bug #72759 Regression in pgo_pgsql
This is caused by the fix for #72633. Namely, lastval() throws an error,
if no nextval() was called earlier in the same session. This is by all
means correct so far, however inside a transaction it leads to an abort.
This is the opposite to MySQL's last_insert_id() which doesn't produce
any error no matter something were autoincremented or not.
To avoid existing scripts breakage in the stable branches, the previous
patch is extended to revert the transaction to the state before the lastval()
call in case of error. It is done only for 5.6 and 7.0 to retain BC. For 7.1+,
the clean behavior should persist. This is already the current behavior, when
the sequence name is explicitly passed. So there's no reason to obfuscate the
errors where this breakage is valid.
Jakub Zelenka [Sun, 14 Aug 2016 13:00:35 +0000 (14:00 +0100)]
Merge branch 'PHP-5.6' into PHP-7.0
Jakub Zelenka [Sun, 14 Aug 2016 12:52:59 +0000 (13:52 +0100)]
Fixed bug #72787 (json_decode reads out of bounds)
Nikita Popov [Sat, 13 Aug 2016 19:41:00 +0000 (21:41 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
Benedict Singer [Wed, 10 Aug 2016 14:03:12 +0000 (15:03 +0100)]
Bug 70195
Many FTP-S servers now require FTP clients to re-use the SSL session
from the control connection on the data connection, to prove that the
same entity controls both connections. This patch updates PHP's FTP-S
client code to allow that possibility.
Christoph M. Becker [Sat, 13 Aug 2016 14:22:49 +0000 (16:22 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
Christoph M. Becker [Sat, 13 Aug 2016 14:02:10 +0000 (16:02 +0200)]
Fix #72278: getimagesize returning FALSE on valid jpg
getimagesize() is rather strict about the length of the marker payload data,
and fails if there are extraneous bytes before the next marker. Only a very
special case reported in bug #13213 is catered to.
libjpeg is rather resilient to such corrupted JPEG files, and raises a
recoverable error in this case. Other image processors also accept such
JPEG files, so we adapt getimagesize() to skip (but warn about) such
extraneous bytes.
Christoph M. Becker [Sat, 13 Aug 2016 09:47:20 +0000 (11:47 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
Christoph M. Becker [Sat, 13 Aug 2016 09:39:16 +0000 (11:39 +0200)]
Fix #72823: strtr out-of-bound access
If php_strtr_array_prepare_repls() reports pattern_len == 0, we return
early to avoid OOB accesses, and because there is nothing to replace anyway.
Christoph M. Becker [Fri, 12 Aug 2016 23:19:09 +0000 (01:19 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
Christoph M. Becker [Fri, 12 Aug 2016 22:31:55 +0000 (00:31 +0200)]
Fix #60665: call to empty() on NULL result using PDO::FETCH_LAZY returns false
The has_property handler only checked whether a respective column name
exists, but neither whether the column value is set, nor whether it is
empty, respectively. We fix that to match the behavior of POD:FETCH_OBJ in
particular and PHP in general.
Christoph M. Becker [Fri, 12 Aug 2016 10:54:21 +0000 (12:54 +0200)]
Fix #72793: xml_parser_free leaks mem when execute xml_set_object
Xinchen Hui [Fri, 12 Aug 2016 08:25:18 +0000 (16:25 +0800)]
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
Fix URL rewriter partially
Support "git worktree"
Xinchen Hui [Fri, 12 Aug 2016 08:23:40 +0000 (16:23 +0800)]
Fixed bug #72813 (Segfault with __get returned by ref)
This should be safe change, as we don't dereference value and member
after calling setter/getter.
And compare to adding unref codes, this is much cheaper.
Stanislav Malyshev [Thu, 11 Aug 2016 06:46:58 +0000 (23:46 -0700)]
Use size_t for path length
Stanislav Malyshev [Thu, 11 Aug 2016 06:46:33 +0000 (23:46 -0700)]
Check for string overflow
Stanislav Malyshev [Thu, 11 Aug 2016 05:33:18 +0000 (22:33 -0700)]
Fix for bug #72782: mcrypt accepts only ints, so don't pass anything else
Yasuo Ohgaki [Wed, 10 Aug 2016 22:19:14 +0000 (07:19 +0900)]
Fix URL rewriter partially
Yasuo Ohgaki [Wed, 10 Aug 2016 22:18:35 +0000 (07:18 +0900)]
Fix URL rewriter partially
Yasuo Ohgaki [Wed, 10 Aug 2016 23:09:05 +0000 (08:09 +0900)]
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
Support "git worktree"
Yasuo Ohgaki [Wed, 10 Aug 2016 23:08:26 +0000 (08:08 +0900)]
Support "git worktree"
Keyur [Tue, 9 Aug 2016 17:29:36 +0000 (17:29 +0000)]
Add NEWS
Keyur [Tue, 9 Aug 2016 17:27:52 +0000 (17:27 +0000)]
Merge branch 'pull-request/2067' into PHP-7.0
Keyur [Tue, 9 Aug 2016 14:41:20 +0000 (14:41 +0000)]
Fix ASSERT logic
Keyur [Tue, 9 Aug 2016 14:01:25 +0000 (14:01 +0000)]
Bugfix 72791: fix memory leak in PDO persistent connections
Nikita Popov [Tue, 9 Aug 2016 13:33:15 +0000 (15:33 +0200)]
Don't copy mime types in CLI server
This is both unnecessary and causes leaks in valgrind.
Christopher Jones [Tue, 9 Aug 2016 06:12:58 +0000 (16:12 +1000)]
Remove obsolete Id tags
Christopher Jones [Tue, 9 Aug 2016 05:59:59 +0000 (15:59 +1000)]
Bump version in OCI8 test
Xinchen Hui [Tue, 9 Aug 2016 03:32:16 +0000 (11:32 +0800)]
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Xinchen Hui [Tue, 9 Aug 2016 03:25:32 +0000 (11:25 +0800)]
Merge branch 'bug72788' of https://github.com/keyurdg/php-src into PHP-7.0
* 'bug72788' of https://github.com/keyurdg/php-src:
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Keyur [Tue, 9 Aug 2016 01:36:15 +0000 (01:36 +0000)]
Remove typo'd commit
Keyur [Mon, 8 Aug 2016 23:34:00 +0000 (23:34 +0000)]
Fix bug 72788: Invalid memory access when database_object_handle
is undefined. Also fix memory leak in dbh_free when using persistent
PDO connections.
Andrea Faulds [Mon, 8 Aug 2016 19:56:11 +0000 (20:56 +0100)]
Replace dead branch with ZEND_ASSERT()
Christoph M. Becker [Mon, 8 Aug 2016 16:45:27 +0000 (18:45 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
Christoph M. Becker [Mon, 8 Aug 2016 16:43:33 +0000 (18:43 +0200)]
Add test for bug #69107: finfo no longer detects PHP files
Lauri Kenttä [Wed, 3 Aug 2016 08:29:12 +0000 (11:29 +0300)]
Fix bug #55451
Make substr_compare ignore the length if it's NULL. This allows to
use the last parameter (case_insensitivity) with the default length.
Nikita Popov [Sun, 7 Aug 2016 16:38:28 +0000 (18:38 +0200)]
Merge branch 'PHP-5.6' into PHP-7.0
Nikita Popov [Sun, 7 Aug 2016 16:36:32 +0000 (18:36 +0200)]
Fix stream_socket_enable_crypto() test
The whole test doesn't make any sense at all, but this only fixes
the additional warnings you get when linked against openssl w/o
SSL3.
Christopher Jones [Sun, 7 Aug 2016 00:24:56 +0000 (10:24 +1000)]
Remove old $Id$ tags
Christopher Jones [Sun, 7 Aug 2016 00:17:06 +0000 (10:17 +1000)]
Sync with 7.1 branch changes from Nikita & Dimitri to keep OCI8 code identical