1
0
mirror of https://github.com/php/php-src.git synced 2026-04-10 09:33:06 +02:00
Commit Graph

115460 Commits

Author SHA1 Message Date
Derick Rethans
dca8d5565b Update versions for PHP 7.4.33 php-7.4.33 2022-10-31 10:35:56 +00:00
Derick Rethans
c40dcf93d0 Update NEWS for PHP 7.4.33 2022-10-31 10:35:56 +00:00
Stanislav Malyshev
2669ed7d77 Update NEWS 2022-10-23 18:50:53 -06:00
Christoph M. Becker
d50532be91 Fix #81739: OOB read due to insufficient validation in imageloadfont()
If we swap the byte order of the relevant header bytes, we need to make
sure again that the following multiplication does not overflow.
2022-10-23 18:41:48 -06:00
Ilija Tovilo
8b919c3175 Revert incorrect PHP-7.4 version constants 2022-10-21 12:49:50 +02:00
Stanislav Malyshev
248f647724 Fix bug #81738 (buffer overflow in hash_update() on long parameter) 2022-10-20 23:57:35 -06:00
Derick Rethans
ad8d00b47b Prepare for next release 2022-09-28 10:14:50 +01:00
Derick Rethans
0b4e153394 Prepare for 7.4.32 2022-09-28 10:07:43 +01:00
Christoph M. Becker
432bf196d5 Fix regression introduced by fixing bug 81726
When a tar phar is created, `phar_open_from_fp()` is also called, but
since the file has just been created, none of the format checks can
succeed, so we continue to loop, but must not check again for the
format.  Therefore, we bring back the old `test` variable.

Closes GH-9620.
2022-09-27 18:21:32 +02:00
Derick Rethans
6f586ef90f Add CVEs 2022-09-27 14:10:02 +01:00
Christoph M. Becker
404e8bdb68 Fix #81726: phar wrapper: DOS when using quine gzip file
The phar wrapper needs to uncompress the file; the uncompressed file
might be compressed, so the wrapper implementation loops. This raises
potential DOS issues regarding too deep or even infinite recursion (the
latter are called compressed file quines[1]). We avoid that by
introducing a recursion limit; we choose the somewhat arbitrary limit
`3`.

This issue has been reported by real_as3617 and gPayl0ad.

[1] <https://honno.dev/gzip-quine/>
2022-09-09 17:10:04 +01:00
Derick Rethans
0611be4e82 Fix #81727: Don't mangle HTTP variable names that clash with ones that have a specific semantic meaning. 2022-09-09 17:10:04 +01:00
Remi Collet
198f3f509d [ci skip] missing CVE 2022-06-10 14:28:31 +02:00
Derick Rethans
8fbeadcd45 Bump version in 7.4 to 7.4.31-dev 2022-06-07 09:48:06 +01:00
Stanislav Malyshev
d1be9369ad Update NEWS 2022-06-06 01:00:38 -06:00
Stanislav Malyshev
58006537fc Fix bug #81719: mysqlnd/pdo password buffer overflow 2022-06-06 00:56:51 -06:00
Christoph M. Becker
55f6895f4b Fix #81720: Uninitialized array in pg_query_params() leading to RCE
We must not free parameters which we haven't initialized yet.

We also fix the not directly related issue, that we checked for the
wrong value being `NULL`, potentially causing a segfault.
2022-06-06 00:34:23 -06:00
Derick Rethans
fbee73df14 Prepare for 7.4.30 2022-04-12 15:41:55 +01:00
Derick Rethans
c14e2e4fc9 Add tz update into NEWS 2022-04-12 11:53:17 +01:00
Derick Rethans
1a0514992d Prep NEWS for 7.4.29 release 2022-04-12 11:31:33 +01:00
Derick Rethans
341bea37e8 Updated to version 2022.1 (2022a) 2022-04-07 10:45:17 +01:00
Derick Rethans
325bcf9f1d Prepare for 7.4.29 2022-02-15 13:27:37 +00:00
Derick Rethans
d13ceb74fa Add fix to NEWS 2022-02-14 16:23:06 +00:00
Christoph M. Becker
dce5e561a6 Fix #81708: UAF due to php_filter_float() failing for ints
We must only release the zval, if we actually assign a new zval.
2022-02-13 21:31:35 -08:00
Christoph M. Becker
6d5f2ba78d macOS 10.14 runners are no longer available via Azure Pipeline
These images have already been deprecated for two months[1].  Thus,
we upgrade to macOS 10.15.  Since clang 12 is picky about
`int-in-bool-context` warning, we disable `-Werror`.

[1] <https://devblogs.microsoft.com/devops/hosted-pipelines-image-deprecation/>
2021-12-12 19:11:21 +01:00
Christoph M. Becker
98175fc7f1 Fix openssl_x509_checkpurpose_basic.phpt
This test fails because san-cert.pem and san-ca.pem have expired.  We
fix that by using the CertificateGenerator to generate temporary certs
during the test run.  Since san-cert.pem and san-ca.pem have been
identical, we only generate one certificate.

Closes GH-7763.
2021-12-12 14:26:17 +01:00
Derick Rethans
f533744c92 Prepare for 7.4.28 2021-11-30 18:40:42 +00:00
Christoph M. Becker
712fc54e85 Fix #74604: Out of bounds in php_pcre_replace_impl
Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow; we make sure that this
doesn't happen by catering to the maximal overhead of a `zend_string`.

Closes GH-7597.
2021-11-29 19:12:55 +01:00
Christoph M. Becker
31749aac62 Fix #81659: stream_get_contents() may unnecessarily overallocate
Since we're going to read from the current stream position anyway, the
`max_len` should be the size of the file minus the current position
(still catering to potentially filtered streams).  We must, however,
make sure to cater to the file position being beyond the actual file
size.

While we're at, we also fix the step size in the comment, which is 8K.

A further optimization could be done for unfiltered streams, thus
saving that step size, but 8K might not be worth it.

Closes GH-7693.
2021-11-29 14:46:09 +01:00
Nikita Popov
c2d6d837ca Disable enchant on azure i386
The i386 libenchant library no longer installs without conflicts,
so drop i386 testing for this extension.
2021-11-26 11:03:32 +01:00
Дилян Палаузов
60fe575ce3 Fix #75725: ./configure: detecting RAND_egd
Closes GH-7668.
2021-11-22 14:11:07 +01:00
Christoph M. Becker
be1cb5a13a [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  7.3.34 might be next
2021-11-16 13:26:05 +01:00
Christoph M. Becker
7d92153182 7.3.34 might be next 2021-11-16 13:24:00 +01:00
Christoph M. Becker
8a2076475e [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Fix news entry for bug #79971
  [ci skip] Update NEWS
2021-11-16 13:11:53 +01:00
Christoph M. Becker
d14a9139d5 [ci skip] Fix news entry for bug #79971 2021-11-16 13:06:04 +01:00
Nikita Popov
d26965b247 Fixed bug #81626
Backport of a8926474cb to 7.4.
2021-11-16 12:45:33 +01:00
Nikita Popov
18a0d46a1b Safely reassign array in usort()
Make sure to destroy the old value only after assigning the new
one. Otherwise we may try to double free, e.g. if GC runs during
this dtor.

This caused an assertion failure in phpro/grumphp and is likely
the cause for bug #81603 as well.

(cherry picked from commit 6f38acfaf9)

(I applied this to the wrong base branch at first...)
2021-11-16 10:15:47 +01:00
Matt
45f52285f6 Fix bug #81618: Correct dns_get_record on FreeBSD
Modify dns_get_record to test for records result based on dns_errno to
accommodate modern FreeBSD, for which res_nsearch() does not update
h_errno directly. Add new php_dns_errno macro, and have it consult
statp->res_h_errno when OS has res_nsearch().

Closes GH-7655.
2021-11-15 10:00:07 +01:00
Stanislav Malyshev
7967875d70 [ci skip] Update NEWS 2021-11-14 23:35:26 -08:00
Stanislav Malyshev
ca87d46a3e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79971: special character is breaking the path in xml function
2021-11-14 23:28:13 -08:00
Christoph M. Becker
f15f8fc573 Fix #79971: special character is breaking the path in xml function
The libxml based XML functions accepting a filename actually accept
URIs with possibly percent-encoded characters.  Percent-encoded NUL
bytes lead to truncation, like non-encoded NUL bytes would.  We catch
those, and let the functions fail with a respective warning.
2021-11-14 23:24:33 -08:00
Jakub Zelenka
b2cf9b7ec7 Fix bug #81513 (Future possibility for heap overflow in FPM zlog)
This fixes currently unused code path in zlog that could lead to
the heap overflow in the future.
2021-11-14 20:08:57 +00:00
Christoph M. Becker
1919c4b44d Fix #71316: libpng warning from imagecreatefromstring
We backport the respective upstream fix[1] to our bundled libgd.

[1] <636100b928>

Closes GH-7615.
2021-11-04 11:16:45 +01:00
Derick Rethans
905a1d5011 Merge branch 'PHP-7.3' into PHP-7.4 2021-11-03 16:13:22 +00:00
Derick Rethans
88f99c9c1d Revert "Updated to version 2021.5 (2021e)"
This reverts commit a93ff1df20.
2021-11-03 16:13:05 +00:00
Derick Rethans
7c9c722b53 Updated to version 2021.5 (2021e) 2021-11-03 15:49:24 +00:00
Derick Rethans
5715a5e570 Empty merge 2021-11-03 15:49:24 +00:00
Derick Rethans
a93ff1df20 Updated to version 2021.5 (2021e) 2021-11-03 15:49:23 +00:00
George Peter Banyard
96dd310c54 Fix Bug #81588 TokyoCabinet driver leaks memory 2021-11-03 14:57:47 +00:00
Derick Rethans
05b212bb3d Prepare for 7.4.27 2021-11-02 16:39:44 +00:00