Skip to contentSkip to conversation

php: upgrade 8.2.29 -> 8.2.30

PATCH New Gyorgy Sarvari 1 participant 1 message Mar 10

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 php: upgrade 8.2.29 -> 8.2.30

Drop patches that are included in this release.

Changes: https://www.php.net/ChangeLog-8.php#8.2.30
- Curl: Fix curl build and test failures with version 8.16.
- Opcache: Reset global pointers to prevent use-after-free in zend_jit_status().
- PDO: PDO quoting result null deref - CVE-2025-14180
- Null byte termination in dns_get_record()
- Heap buffer overflow in array_merge() - CVE-2025-14178
- Information Leak of Memory in getimagesize - CVE-2025-14177

---
 .../php/php/CVE-2025-14177.patch              | 84 -------------------
 .../php/php/CVE-2025-14178.patch              | 65 --------------
 .../php/php/CVE-2025-14180.patch              | 69 ---------------
 .../php/{php_8.2.29.bb => php_8.2.30.bb}      |  5 +-
 4 files changed, 1 insertion(+), 222 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/php/php/CVE-2025-14177.patch
 delete mode 100644 meta-oe/recipes-devtools/php/php/CVE-2025-14178.patch
 delete mode 100644 meta-oe/recipes-devtools/php/php/CVE-2025-14180.patch
 rename meta-oe/recipes-devtools/php/{php_8.2.29.bb => php_8.2.30.bb} (98%)
meta-oe/recipes-devtools/php/php/CVE-2025-14177.patch deleted +0 -84
deleted file mode 100644
index 6b5ffe0029..0000000000
@@ -1,84 +0,0 @@
-From 7aac95c5280ea395ccfcd624cae7e87749ff6eeb Mon Sep 17 00:00:00 2001
-From: Niels Dossche <[email protected]>
-Date: Tue, 25 Nov 2025 23:11:38 +0100
-Subject: [PATCH] Fix GH-20584: Information Leak of Memory
-
-The string added had uninitialized memory due to
-php_read_stream_all_chunks() not moving the buffer position, resulting
-in the same data always being overwritten instead of new data being
-added to the end of the buffer.
-
-This is backport as there is a security impact as described in
-GHSA-3237-qqm7-mfv7 .
-
-CVE: CVE-2025-14177
-Upstream-Status: Backport [https://github.com/php/php-src/commit/c5f28c7cf0a0]
-
-(cherry picked from commit c5f28c7cf0a052f48e47877c7aa5c5bcc54f1cfc)
-Signed-off-by: Anil Dongare <[email protected]>
----
- ext/standard/image.c                  |  1 +
- ext/standard/tests/image/gh20584.phpt | 39 +++++++++++++++++++++++++++
- 2 files changed, 40 insertions(+)
- create mode 100644 ext/standard/tests/image/gh20584.phpt
-
-diff --git a/ext/standard/image.c b/ext/standard/image.c
-index 2bd5429efac..15761364c34 100644
---- a/ext/standard/image.c
-+++ b/ext/standard/image.c
-@@ -403,6 +403,7 @@ static size_t php_read_stream_all_chunks(php_stream *stream, char *buffer, size_
- 		if (read_now < stream->chunk_size && read_total != length) {
- 			return 0;
- 		}
-+		buffer += read_now;
- 	} while (read_total < length);
- 
- 	return read_total;
-diff --git a/ext/standard/tests/image/gh20584.phpt b/ext/standard/tests/image/gh20584.phpt
-new file mode 100644
-index 00000000000..d117f218202
---- /dev/null
-+++ b/ext/standard/tests/image/gh20584.phpt
-@@ -0,0 +1,39 @@
-+--TEST--
-+GH-20584 (Information Leak of Memory)
-+--CREDITS--
-+Nikita Sveshnikov (Positive Technologies)
-+--FILE--
-+<?php
-+// Minimal PoC: corruption/uninitialized memory leak when reading APP1 via php://filter
-+$file = __DIR__ . '/gh20584.jpg';
-+
-+// Make APP1 large enough so it is read in multiple chunks
-+$chunk = 8192;
-+$tail = 123;
-+$payload = str_repeat('A', $chunk) . str_repeat('B', $chunk) . str_repeat('Z',
-+$tail);
-+$app1Len = 2 + strlen($payload);
-+
-+// Minimal JPEG: SOI + APP1 + SOF0(1x1) + EOI
-+$sof = "\xFF\xC0" . pack('n', 11) . "\x08" . pack('n',1) . pack('n',1) .
-+"\x01\x11\x00";
-+$jpeg = "\xFF\xD8" . "\xFF\xE1" . pack('n', $app1Len) . $payload . $sof .
-+"\xFF\xD9";
-+file_put_contents($file, $jpeg);
-+
-+// Read through a filter to enforce multiple reads
-+$src = 'php://filter/read=string.rot13|string.rot13/resource=' . $file;
-+$info = null;
-+@getimagesize($src, $info);
-+$exp = $payload;
-+$ret = $info['APP1'];
-+
-+var_dump($ret === $exp);
-+
-+?>
-+--CLEAN--
-+<?php
-+@unlink(__DIR__ . '/gh20584.jpg');
-+?>
-+--EXPECT--
-+bool(true)
--- 
-2.43.5
-
meta-oe/recipes-devtools/php/php/CVE-2025-14178.patch deleted +0 -65

65 lines not on this page · raw message

meta-oe/recipes-devtools/php/php/CVE-2025-14180.patch deleted +0 -69

69 lines not on this page · raw message

meta-oe/recipes-devtools/php/php_8.2.30.bb renamed from meta-oe/recipes-devtools/php/php_8.2.29.bb +1 -4
similarity index 98%
rename from meta-oe/recipes-devtools/php/php_8.2.29.bb
rename to meta-oe/recipes-devtools/php/php_8.2.30.bb
index 08e7e80c84..13403855d7 100644
@@ -20,9 +20,6 @@ SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \
            file://0009-php-don-t-use-broken-wrapper-for-mkdir.patch \
            file://0010-iconv-fix-detection.patch \
            file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \
-           file://CVE-2025-14177.patch \
-           file://CVE-2025-14178.patch \
-           file://CVE-2025-14180.patch \
           "
 
 SRC_URI:append:class-target = " \
@@ -37,7 +34,7 @@ SRC_URI:append:class-target = " \
           "
 
 S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] = "51979e8d198cbade2aad4ffe9f53dd3f04f9602d3089e5979985e058ade4267c"
+SRC_URI[sha256sum] = "104820b6c8fc959dde4b3342135f42bdabf246e86918a16381a17d8447c866fa"
 
 CVE_STATUS_GROUPS += "CVE_STATUS_PHP"
 CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored."