[packages/php/PHP_5_3] Rel 74. Backport the 2026-11-19 PHP security fixes

arekm arekm at pld-linux.org
Thu Nov 19 18:54:32 CET 2026


commit 5c15c3157ce1d538093f35198bddc80cd3beb35a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Nov 19 18:35:41 2026 +0100

    Rel 74. Backport the 2026-11-19 PHP security fixes
    
    Fixes CVE-2026-129538, CVE-2026-129506, CVE-2026-129496,
    CVE-2026-129481, CVE-2026-129292, CVE-2026-129291, CVE-2026-129289,
    CVE-2026-128090, CVE-2026-128064, CVE-2026-127960, CVE-2026-126714,
    CVE-2026-15353.

 php-5.3.29-CVE-2026-126714.patch |  21 +++++
 php-5.3.29-CVE-2026-127960.patch | 111 +++++++++++++++++++++++++
 php-5.3.29-CVE-2026-128064.patch |  29 +++++++
 php-5.3.29-CVE-2026-128090.patch |  33 ++++++++
 php-5.3.29-CVE-2026-129289.patch |  53 ++++++++++++
 php-5.3.29-CVE-2026-129291.patch |  31 +++++++
 php-5.3.29-CVE-2026-129292.patch | 174 +++++++++++++++++++++++++++++++++++++++
 php-5.3.29-CVE-2026-129481.patch |  22 +++++
 php-5.3.29-CVE-2026-129496.patch |  24 ++++++
 php-5.3.29-CVE-2026-129506.patch |  17 ++++
 php-5.3.29-CVE-2026-129538.patch |  19 +++++
 php-5.3.29-CVE-2026-15353.patch  |  16 ++++
 php.spec                         |  30 ++++++-
 13 files changed, 577 insertions(+), 3 deletions(-)
---
diff --git a/php.spec b/php.spec
index d104883..caf464d 100644
--- a/php.spec
+++ b/php.spec
@@ -143,7 +143,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine	with_alternatives
 %endif
 
-%define		rel	73
+%define		rel	74
 %define		orgname	php
 %define		ver_suffix 53
 %define		php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -162,7 +162,7 @@ Epoch:		4
 # TSRM is licensed under BSD
 License:	PHP 3.01 and Zend and BSD
 Group:		Libraries
-Source0:	http://www.php.net/distributions/%{orgname}-%{version}.tar.bz2
+Source0:	https://www.php.net/distributions/%{orgname}-%{version}.tar.bz2
 # Source0-md5:	9469e240cbe6ac865aeaec89b253dd30
 Source2:	%{orgname}-mod_%{orgname}.conf
 Source3:	%{orgname}-cgi-fcgi.ini
@@ -173,7 +173,7 @@ Source11:	%{orgname}-fpm.logrotate
 Source12:	%{orgname}-branch.sh
 Source13:	dep-tests.sh
 Source14:	skip-tests.sh
-Source15:	http://litespeedtech.com/packages/lsapi/%{orgname}-litespeed-%{litespeed_version}.tgz
+Source15:	https://litespeedtech.com/packages/lsapi/%{orgname}-litespeed-%{litespeed_version}.tgz
 # Source15-md5:	9d58485d5fd6b5f5fefcec41b9ce283e
 Patch0:		%{orgname}-shared.patch
 Patch1:		%{orgname}-pldlogo.patch
@@ -271,6 +271,18 @@ Patch228:	php-5.3.29-GHSA-wg4p-4hqh-c3g9.patch
 Patch229:	php-5.3.29-CVE-2025-1735.patch
 Patch230:	php-5.3.29-CVE-2026-6722.patch
 Patch231:	php-5.3.29-CVE-2026-109618.patch
+Patch232:	php-5.3.29-CVE-2026-129538.patch
+Patch233:	php-5.3.29-CVE-2026-129496.patch
+Patch234:	php-5.3.29-CVE-2026-129292.patch
+Patch235:	php-5.3.29-CVE-2026-129291.patch
+Patch236:	php-5.3.29-CVE-2026-129289.patch
+Patch237:	php-5.3.29-CVE-2026-128090.patch
+Patch238:	php-5.3.29-CVE-2026-15353.patch
+Patch239:	php-5.3.29-CVE-2026-129506.patch
+Patch240:	php-5.3.29-CVE-2026-126714.patch
+Patch241:	php-5.3.29-CVE-2026-128064.patch
+Patch242:	php-5.3.29-CVE-2026-127960.patch
+Patch243:	php-5.3.29-CVE-2026-129481.patch
 URL:		https://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:	Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:	aspell-devel >= 2:0.50.0}
@@ -2188,6 +2200,18 @@ gzip -dc %{SOURCE15} | tar xf - -C sapi/
 %patch -P229 -p1
 %patch -P230 -p1
 %patch -P231 -p1
+%patch -P232 -p1
+%patch -P233 -p1
+%patch -P234 -p1
+%patch -P235 -p1
+%patch -P236 -p1
+%patch -P237 -p1
+%patch -P238 -p1
+%patch -P239 -p1
+%patch -P240 -p1
+%patch -P241 -p1
+%patch -P242 -p1
+%patch -P243 -p1
 # the patches carry the regenerated scanners, keep make from rebuilding them
 touch ext/date/lib/parse_date.c ext/standard/var_unserializer.c Zend/zend_ini_parser.c
 
diff --git a/php-5.3.29-CVE-2026-126714.patch b/php-5.3.29-CVE-2026-126714.patch
new file mode 100644
index 0000000..1280cdf
--- /dev/null
+++ b/php-5.3.29-CVE-2026-126714.patch
@@ -0,0 +1,21 @@
+CVE-2026-126714 (GHSA-fm2m-fjf5-v3cp): an interrupted session file write could leave the tail
+of the old session behind the new data; php-src 41c0941ae27d
+
+diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
+index 5b7d395c2..a74b830e9 100644
+--- a/ext/session/mod_files.c
++++ b/ext/session/mod_files.c
+@@ -400,10 +400,9 @@ PS_WRITE_FUNC(files)
+ 		return FAILURE;
+ 	}
+ 
+-	/* Truncate file if the amount of new data is smaller than the existing data set. */
+-
+-	if (vallen < (int)data->st_size) {
+-		ftruncate(data->fd, 0);
++	if (ftruncate(data->fd, 0) != 0) {
++		php_error_docref(NULL TSRMLS_CC, E_WARNING, "ftruncate() failed: %s (%d)", strerror(errno), errno);
++		return FAILURE;
+ 	}
+ 
+ #if defined(HAVE_PWRITE)
diff --git a/php-5.3.29-CVE-2026-127960.patch b/php-5.3.29-CVE-2026-127960.patch
new file mode 100644
index 0000000..694c083
--- /dev/null
+++ b/php-5.3.29-CVE-2026-127960.patch
@@ -0,0 +1,111 @@
+CVE-2026-127960 (GHSA-mmf9-xm3v-hg2x): each folded HTTP response header line copied the whole
+header so far (quadratic CPU); php-src a303f697268d
+
+diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
+index f436d0d3d..86a9b3935 100644
+--- a/ext/standard/http_fopen_wrapper.c
++++ b/ext/standard/http_fopen_wrapper.c
+@@ -156,24 +156,6 @@ static inline void strip_header(char *header_bag, char *lc_header_bag,
+ 	}
+ }
+ 
+-static ZEND_API char *zend_string_concat3(
+-		const char *str1, size_t str1_len,
+-		const char *str2, size_t str2_len,
+-		const char *str3, size_t str3_len,
+-    	size_t *new_len)
+-{
+-	size_t len = str1_len + str2_len + str3_len;
+-	char *res = (char *) emalloc(len + 1);
+-
+-	memcpy(res, str1, str1_len);
+-	memcpy(res + str1_len, str2, str2_len);
+-	memcpy(res + str1_len + str2_len, str3, str3_len);
+-	res[len] = '\0';
+-	if (new_len)
+-		*new_len = len;
+-	return res;
+-}
+-
+ typedef struct _php_stream_http_response_header_info {
+ 	php_stream_filter *transfer_encoding;
+ 	size_t file_size;
+@@ -229,7 +211,7 @@ static char *php_stream_http_response_headers_parse(php_stream_wrapper *wrapper,
+ 		char *last_header_line_str, char *header_line, size_t *header_line_length,
+ 		int response_code, zval *response_header,
+ 		php_stream_http_response_header_info *header_info,
+-		size_t *last_header_line_len)
++		size_t *last_header_line_len, size_t *last_header_line_size)
+ {
+ 	size_t last_header_line_length;
+ 	char *last_header_line_end;
+@@ -255,7 +237,7 @@ static char *php_stream_http_response_headers_parse(php_stream_wrapper *wrapper,
+ 		if (header_line && (*header_line == ' ' || *header_line == '\t')) {
+ 			char *http_folded_header_line = header_line;
+ 			size_t http_folded_header_line_length = *header_line_length;
+-			char *extended_header_str;
++			size_t needed;
+ 			/* Remove the leading white spaces. */
+ 			while (*http_folded_header_line == ' ' || *http_folded_header_line == '\t') {
+ 				http_folded_header_line++;
+@@ -265,14 +247,18 @@ static char *php_stream_http_response_headers_parse(php_stream_wrapper *wrapper,
+ 			 * php_stream_http_response_header_trim above. */
+ 			if(http_folded_header_line_length == 0 || http_folded_header_line_length > *header_line_length)
+ 				return NULL;
+-			/* Concatenate last header line, space and current header line. */
+-			extended_header_str = zend_string_concat3(
+-					last_header_line_str, last_header_line_length,
+-					" ", 1,
+-					http_folded_header_line, http_folded_header_line_length,
+-					last_header_line_len);
+-			efree(last_header_line_str);
+-			last_header_line_str = extended_header_str;
++			/* Append space and current header line to the last header line, growing the
++			 * buffer geometrically so that each folded line does not copy the whole header. */
++			needed = last_header_line_length + 1 + http_folded_header_line_length + 1;
++			if (needed > *last_header_line_size) {
++				*last_header_line_size = MAX(needed, 2 * *last_header_line_size);
++				last_header_line_str = erealloc(last_header_line_str, *last_header_line_size);
++			}
++			last_header_line_str[last_header_line_length] = ' ';
++			memcpy(last_header_line_str + last_header_line_length + 1,
++					http_folded_header_line, http_folded_header_line_length);
++			*last_header_line_len = last_header_line_length + 1 + http_folded_header_line_length;
++			last_header_line_str[*last_header_line_len] = '\0';
+ 			/* Return new header line. */
+ 			return last_header_line_str;
+ 		}
+@@ -425,6 +411,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
+ 	char *http_header_line = NULL;
+ 	char *last_header_line_str = NULL;
+ 	size_t last_header_line_length = 0;
++	size_t last_header_line_size = 0;
+ 	php_stream_http_response_header_info header_info;
+ 	char tmp_line[128];
+ 	size_t chunk_size = 0;
+@@ -1073,7 +1060,7 @@ finish:
+ 				last_header_line_str = php_stream_http_response_headers_parse(wrapper, stream,
+ 						context, options, last_header_line_str, http_header_line,
+ 						&http_header_line_length, response_code, response_header, &header_info,
+-						&last_header_line_length);
++						&last_header_line_length, &last_header_line_size);
+ 				if (EXPECTED(last_header_line_str == NULL)) {
+ 					if (UNEXPECTED(header_info.error)) {
+ 						php_stream_close(stream);
+@@ -1106,6 +1093,7 @@ finish:
+ 			/* Save current line as the last line so it gets parsed in the next round. */
+ 			last_header_line_str = estrndup(http_header_line, http_header_line_length);
+ 			last_header_line_length = http_header_line_length;
++			last_header_line_size = http_header_line_length + 1;
+ 		} else {
+ 			break;
+ 		}
+@@ -1115,7 +1103,7 @@ finish:
+ 	if (last_header_line_str != NULL) {
+ 		php_stream_http_response_headers_parse(wrapper, stream, context, options,
+ 		last_header_line_str, NULL, NULL, response_code, response_header, &header_info,
+-		&last_header_line_length);
++		&last_header_line_length, &last_header_line_size);
+ 	}
+ 
+ 	if (!reqok || (header_info.location != NULL && header_info.follow_location)) {
diff --git a/php-5.3.29-CVE-2026-128064.patch b/php-5.3.29-CVE-2026-128064.patch
new file mode 100644
index 0000000..4d796c4
--- /dev/null
+++ b/php-5.3.29-CVE-2026-128064.patch
@@ -0,0 +1,29 @@
+CVE-2026-128064 (GHSA-f6gg-rchx-xw8j): HTTPS:// and FTPS:// URLs with an upper case S used
+plaintext; php-src cb68a63e8177
+
+diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
+index 5d43d3500..4b10f32e0 100644
+--- a/ext/standard/ftp_fopen_wrapper.c
++++ b/ext/standard/ftp_fopen_wrapper.c
+@@ -148,7 +148,7 @@ static php_stream *php_ftp_fopen_connect(php_stream_wrapper *wrapper, char *path
+ 		return NULL;
+ 	}
+ 
+-	use_ssl = resource->scheme && (strlen(resource->scheme) > 3) && resource->scheme[3] == 's';
++	use_ssl = resource->scheme && !strcasecmp(resource->scheme, "ftps");
+ 
+ 	/* use port 21 if one wasn't specified */
+ 	if (resource->port == 0)
+diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
+index 5ab60f9c1..f436d0d3d 100644
+--- a/ext/standard/http_fopen_wrapper.c
++++ b/ext/standard/http_fopen_wrapper.c
+@@ -486,7 +486,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
+ 			zval_dtor(&ztmp);
+ 		}
+ 
+-		use_ssl = resource->scheme && (strlen(resource->scheme) > 4) && resource->scheme[4] == 's';
++		use_ssl = resource->scheme && !strcasecmp(resource->scheme, "https");
+ 		/* choose default ports */
+ 		if (use_ssl && resource->port == 0)
+ 			resource->port = 443;
diff --git a/php-5.3.29-CVE-2026-128090.patch b/php-5.3.29-CVE-2026-128090.patch
new file mode 100644
index 0000000..d4cc65a
--- /dev/null
+++ b/php-5.3.29-CVE-2026-128090.patch
@@ -0,0 +1,33 @@
+CVE-2026-128090 (GHSA-68fq-fh7h-f8gr): an OpenSSL signed phar could be downgraded to a keyless
+hash signature; refuse that when <phar>.pubkey exists. php-src 7050cf338092, the key is probed by
+opening it like the OpenSSL check does, as safe_mode makes stat() fail for keys owned by another uid.
+
+diff --git a/ext/phar/util.c b/ext/phar/util.c
+index ccc52f15d..713bebbd7 100644
+--- a/ext/phar/util.c
++++ b/ext/phar/util.c
+@@ -1836,6 +1836,24 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_typ
+ 
+ 	php_stream_rewind(fp);
+ 
++	if (sig_type != PHAR_SIG_OPENSSL) {
++		char *pfile;
++		php_stream *pfp;
++
++		/* opened as the OpenSSL case opens it: with safe_mode on, stat() of a key owned by another uid fails */
++		spprintf(&pfile, 0, "%s.pubkey", fname);
++		pfp = php_stream_open_wrapper(pfile, "rb", 0, NULL);
++		efree(pfile);
++
++		if (pfp) {
++			php_stream_close(pfp);
++			if (error) {
++				spprintf(error, 0, "openssl public key found, but the signature does not use openssl");
++			}
++			return FAILURE;
++		}
++	}
++
+ 	switch (sig_type) {
+ 		case PHAR_SIG_OPENSSL: {
+ #ifdef PHAR_HAVE_OPENSSL
diff --git a/php-5.3.29-CVE-2026-129289.patch b/php-5.3.29-CVE-2026-129289.patch
new file mode 100644
index 0000000..3aff23f
--- /dev/null
+++ b/php-5.3.29-CVE-2026-129289.patch
@@ -0,0 +1,53 @@
+CVE-2026-129289 (GHSA-qc49-hpvq-g2w6): a STDIN record left partially read (CONTENT_LENGTH shorter
+than the body) let its tail be parsed as the next request on a kept connection; fastcgi part of
+php-src 28014fd092c7, in both the cgi and fpm copies. 5.3 has no lazy php://input, its SAPI drain
+is not affected.
+
+diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
+index 5a942cf83..9e6e9e013 100644
+--- a/sapi/cgi/fastcgi.c
++++ b/sapi/cgi/fastcgi.c
+@@ -673,6 +673,10 @@ static int fcgi_read_request(fcgi_request *req)
+ 	int len, padding;
+ 	unsigned char buf[FCGI_MAX_LENGTH+8];
+ 
++	if (req->in_len != 0) {
++		return 0;
++	}
++
+ 	req->keep = 0;
+ 	req->closed = 0;
+ 	req->in_len = 0;
+@@ -925,6 +929,8 @@ static inline void fcgi_close(fcgi_request *req, int force, int destroy)
+ 		close(req->fd);
+ #endif
+ 		req->fd = -1;
++		/* a partially read STDIN record does not outlive its connection */
++		req->in_len = 0;
+ 	}
+ }
+ 
+diff --git a/sapi/fpm/fpm/fastcgi.c b/sapi/fpm/fpm/fastcgi.c
+index cf3f098c5..338323141 100644
+--- a/sapi/fpm/fpm/fastcgi.c
++++ b/sapi/fpm/fpm/fastcgi.c
+@@ -502,6 +502,10 @@ static int fcgi_read_request(fcgi_request *req)
+ 	int len, padding;
+ 	unsigned char buf[FCGI_MAX_LENGTH+8];
+ 
++	if (req->in_len != 0) {
++		return 0;
++	}
++
+ 	req->keep = 0;
+ 	req->closed = 0;
+ 	req->in_len = 0;
+@@ -754,6 +758,8 @@ void fcgi_close(fcgi_request *req, int force, int destroy)
+ 		close(req->fd);
+ #endif
+ 		req->fd = -1;
++		/* a partially read STDIN record does not outlive its connection */
++		req->in_len = 0;
+ 		fpm_request_finished();
+ 	}
+ }
diff --git a/php-5.3.29-CVE-2026-129291.patch b/php-5.3.29-CVE-2026-129291.patch
new file mode 100644
index 0000000..8ae9d19
--- /dev/null
+++ b/php-5.3.29-CVE-2026-129291.patch
@@ -0,0 +1,31 @@
+CVE-2026-129291 (GHSA-jm4m-qfqx-967m): a worker stdio pipe closed without removing its event
+left epoll and the fd queue pointing into the freed child; php-src 8c38b7914497
+
+diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c
+index 22979c883..7edfcb619 100644
+--- a/sapi/fpm/fpm/fpm_children.c
++++ b/sapi/fpm/fpm/fpm_children.c
+@@ -69,7 +69,11 @@ static void fpm_child_close(struct fpm_child_s *child, int in_event_loop) /* {{{
+ 			fpm_event_fire(&child->ev_stdout);
+ 		}
+ 		if (child->fd_stdout != -1) {
++			if (in_event_loop) {
++				fpm_event_del(&child->ev_stdout);
++			}
+ 			close(child->fd_stdout);
++			child->fd_stdout = -1;
+ 		}
+ 	}
+ 
+@@ -78,7 +82,11 @@ static void fpm_child_close(struct fpm_child_s *child, int in_event_loop) /* {{{
+ 			fpm_event_fire(&child->ev_stderr);
+ 		}
+ 		if (child->fd_stderr != -1) {
++			if (in_event_loop) {
++				fpm_event_del(&child->ev_stderr);
++			}
+ 			close(child->fd_stderr);
++			child->fd_stderr = -1;
+ 		}
+ 	}
+ 
diff --git a/php-5.3.29-CVE-2026-129292.patch b/php-5.3.29-CVE-2026-129292.patch
new file mode 100644
index 0000000..7405759
--- /dev/null
+++ b/php-5.3.29-CVE-2026-129292.patch
@@ -0,0 +1,174 @@
+CVE-2026-129292 (GHSA-3mg3-cr28-46gc): the FPM full status printed request method, user and script
+unescaped, and nothing escaped in JSON; php-src 1ecb92f2cdeb. html/xml use htmlspecialchars-style
+escaping as XML has no named entities of the default charset.
+
+diff --git a/sapi/fpm/fpm/fpm_status.c b/sapi/fpm/fpm/fpm_status.c
+index adda9100d..1f7abd0cd 100644
+--- a/sapi/fpm/fpm/fpm_status.c
++++ b/sapi/fpm/fpm/fpm_status.c
+@@ -46,13 +46,59 @@ int fpm_status_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
+ }
+ /* }}} */
+ 
++/* JSON string body without the quotes; bytes >= 0x80 are copied as they are */
++static char *fpm_status_json_escape(const char *str) /* {{{ */
++{
++	char *escaped = safe_emalloc(strlen(str), 6, 1);
++	char *p = escaped;
++
++	for (; *str; str++) {
++		unsigned char c = (unsigned char) *str;
++
++		if (c == '"' || c == '\\') {
++			*p++ = '\\';
++			*p++ = c;
++		} else if (c < 0x20) {
++			p += sprintf(p, "\\u%04x", c);
++		} else {
++			*p++ = c;
++		}
++	}
++	*p = '\0';
++	return escaped;
++}
++/* }}} */
++
++/* escape a scoreboard field for the output format; NULL for an empty field,
++ * *tmp is set when the result has to be efree()d */
++static char *fpm_status_escape(const char *str, int encode_html, int encode_json, char **tmp TSRMLS_DC) /* {{{ */
++{
++	int len;
++
++	*tmp = NULL;
++	if (str[0] == '\0') {
++		return NULL;
++	}
++	if (encode_html) {
++		/* all=0: named entities of the default charset are not defined in XML */
++		*tmp = php_escape_html_entities_ex((unsigned char *) str, strlen(str), &len, 0, ENT_HTML_IGNORE_ERRORS | ENT_COMPAT, NULL, 1 TSRMLS_CC);
++		return *tmp;
++	}
++	if (encode_json) {
++		*tmp = fpm_status_json_escape(str);
++		return *tmp;
++	}
++	return (char *) str;
++}
++/* }}} */
++
+ int fpm_status_handle_request(TSRMLS_D) /* {{{ */
+ {
+ 	struct fpm_scoreboard_s scoreboard, *scoreboard_p;
+ 	struct fpm_scoreboard_proc_s proc;
+ 	char *buffer, *time_format, time_buffer[64];
+ 	time_t now_epoch;
+-	int full, encode;
++	int full, encode, encode_json;
+ 	char *short_syntax, *short_post;
+ 	char *full_pre, *full_syntax, *full_post, *full_separator;
+ 
+@@ -130,6 +176,7 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */
+ 		short_syntax = short_post = NULL;
+ 		full_separator = full_pre = full_syntax = full_post = NULL;
+ 		encode = 0;
++		encode_json = 0;
+ 
+ 		/* HTML */
+ 		if (fpm_php_get_string_from_table("_GET", "html" TSRMLS_CC)) {
+@@ -260,6 +307,7 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */
+ 		} else if (fpm_php_get_string_from_table("_GET", "json" TSRMLS_CC)) {
+ 			sapi_add_header_ex(ZEND_STRL("Content-Type: application/json"), 1, 1 TSRMLS_CC);
+ 			time_format = "%s";
++			encode_json = 1;
+ 
+ 			short_syntax =
+ 				"{"
+@@ -378,10 +426,11 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */
+ 
+ 		/* no need to test the var 'full' */
+ 		if (full_syntax) {
+-			int i, len, first;
+-			char *query_string;
+-			char *request_uri_str;
+-			int uri_len;
++			int i, first;
++			char *request_method_str, *request_uri_str, *query_string;
++			char *auth_user_str, *script_filename_str;
++			char *tmp_request_method, *tmp_request_uri, *tmp_query_string;
++			char *tmp_auth_user, *tmp_script_filename;
+ 			struct timeval duration, now;
+ #ifdef HAVE_FPM_LQ
+ 			float cpu;
+@@ -408,25 +457,11 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */
+ 					}
+ 				}
+ 
+-				request_uri_str = NULL;
+-				uri_len = 0;
+-				if (proc.request_uri[0] != '\0') {
+-					if (!encode) {
+-						request_uri_str = proc.request_uri;
+-					} else {
+-						request_uri_str = php_escape_html_entities_ex((unsigned char *)proc.request_uri, strlen(proc.request_uri), &uri_len, 1, ENT_HTML_IGNORE_ERRORS | ENT_COMPAT, NULL, 1 TSRMLS_CC);
+-					}
+-				}
+-
+-				query_string = NULL;
+-				len = 0;
+-				if (proc.query_string[0] != '\0') {
+-					if (!encode) {
+-						query_string = proc.query_string;
+-					} else {
+-						query_string = php_escape_html_entities_ex((unsigned char *)proc.query_string, strlen(proc.query_string), &len, 1, ENT_HTML_IGNORE_ERRORS | ENT_COMPAT, NULL, 1 TSRMLS_CC);
+-					}
+-				}
++				request_method_str = fpm_status_escape(proc.request_method, encode, encode_json, &tmp_request_method TSRMLS_CC);
++				request_uri_str = fpm_status_escape(proc.request_uri, encode, encode_json, &tmp_request_uri TSRMLS_CC);
++				query_string = fpm_status_escape(proc.query_string, encode, encode_json, &tmp_query_string TSRMLS_CC);
++				auth_user_str = fpm_status_escape(proc.auth_user, encode, encode_json, &tmp_auth_user TSRMLS_CC);
++				script_filename_str = fpm_status_escape(proc.script_filename, encode, encode_json, &tmp_script_filename TSRMLS_CC);
+ 
+ #ifdef HAVE_FPM_LQ
+ 				/* prevent NaN */
+@@ -450,13 +485,13 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */
+ 					now_epoch - proc.start_epoch,
+ 					proc.requests,
+ 					duration.tv_sec * 1000000UL + duration.tv_usec,
+-					proc.request_method[0] != '\0' ? proc.request_method : "-",
++					request_method_str ? request_method_str : "-",
+ 					request_uri_str ? request_uri_str : "-",
+ 					query_string ? "?" : "",
+ 					query_string ? query_string : "",
+ 					proc.content_length,
+-					proc.auth_user[0] != '\0' ? proc.auth_user : "-",
+-					proc.script_filename[0] != '\0' ? proc.script_filename : "-",
++					auth_user_str ? auth_user_str : "-",
++					script_filename_str ? script_filename_str : "-",
+ #ifdef HAVE_FPM_LQ
+ 					proc.request_stage == FPM_REQUEST_ACCEPTING ? cpu : 0.,
+ #endif
+@@ -464,11 +499,20 @@ int fpm_status_handle_request(TSRMLS_D) /* {{{ */
+ 				PUTS(buffer);
+ 				efree(buffer);
+ 
+-				if (len > 0 && query_string) {
+-					efree(query_string);
++				if (tmp_request_method) {
++					efree(tmp_request_method);
++				}
++				if (tmp_request_uri) {
++					efree(tmp_request_uri);
++				}
++				if (tmp_query_string) {
++					efree(tmp_query_string);
++				}
++				if (tmp_auth_user) {
++					efree(tmp_auth_user);
+ 				}
+-				if (uri_len > 0 && request_uri_str) {
+-					efree(request_uri_str);
++				if (tmp_script_filename) {
++					efree(tmp_script_filename);
+ 				}
+ 			}
+ 
diff --git a/php-5.3.29-CVE-2026-129481.patch b/php-5.3.29-CVE-2026-129481.patch
new file mode 100644
index 0000000..2208715
--- /dev/null
+++ b/php-5.3.29-CVE-2026-129481.patch
@@ -0,0 +1,22 @@
+CVE-2026-129481 (GHSA-g3vh-838c-65v7): a bailout in a module RSHUTDOWN (a session value whose
+destructor raises a fatal error) left PS(mod_user_names) pointing into the freed request heap,
+released again by the next request; exit instead. Zend part of php-src ad9b44ae6119.
+
+diff --git a/Zend/zend_API.c b/Zend/zend_API.c
+index 6db295595..3043b6efd 100644
+--- a/Zend/zend_API.c
++++ b/Zend/zend_API.c
+@@ -2183,7 +2183,12 @@ int module_registry_cleanup(zend_module_entry *module TSRMLS_DC) /* {{{ */
+ #if 0
+ 		zend_printf("%s: Request shutdown\n", module->name);
+ #endif
+-		module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
++		zend_try {
++			module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
++		} zend_catch {
++			/* module shutdown is incomplete */
++			_exit(1);
++		} zend_end_try();
+ 	}
+ 	return 0;
+ }
diff --git a/php-5.3.29-CVE-2026-129496.patch b/php-5.3.29-CVE-2026-129496.patch
new file mode 100644
index 0000000..52b45c8
--- /dev/null
+++ b/php-5.3.29-CVE-2026-129496.patch
@@ -0,0 +1,24 @@
+CVE-2026-129496 (GHSA-gr4f-wgx5-jpfv): an error_log file timestamp outside an active request
+built DATEG(tzcache) in memory freed before the next request used it; php-src f986c5ca37c0
+
+diff --git a/main/main.c b/main/main.c
+index aa111aba2..db5d73fa4 100644
+--- a/main/main.c
++++ b/main/main.c
+@@ -612,15 +612,7 @@ PHPAPI void php_log_err(char *log_message TSRMLS_DC)
+ 			char *error_time_str;
+ 
+ 			time(&error_time);
+-#ifdef ZTS
+-			if (!php_during_module_startup()) {
+-				error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC);
+-			} else {
+-				error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC);
+-			}
+-#else
+-			error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC);
+-#endif
++			error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, PG(modules_activated) && EG(active) TSRMLS_CC);
+ 			len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL);
+ #ifdef PHP_WIN32
+ 			php_flock(fd, 2);
diff --git a/php-5.3.29-CVE-2026-129506.patch b/php-5.3.29-CVE-2026-129506.patch
new file mode 100644
index 0000000..7b539ec
--- /dev/null
+++ b/php-5.3.29-CVE-2026-129506.patch
@@ -0,0 +1,17 @@
+CVE-2026-129506 (GHSA-4646-p932-gw34): SOAP XML cleanup freed the DTD that attribute entity
+references still use, which also hid the DTD from the "DTD are not supported" checks; php-src 66db5cda7df3
+
+diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
+index 04e681e2b..b12981caa 100644
+--- a/ext/soap/php_xml.c
++++ b/ext/soap/php_xml.c
+@@ -53,6 +53,9 @@ static void cleanup_xml_node(xmlNodePtr node)
+ 				xmlUnlinkNode(trav);
+ 				xmlFreeNode(trav);
+ 			}
++		} else if (trav->type == XML_DTD_NODE) {
++			/* Attribute-value entity references can share content with the DTD.
++			 * Keep it alive until the document itself is freed. */
+ 		} else if ((trav->type != XML_ELEMENT_NODE) &&
+ 		           (trav->type != XML_CDATA_SECTION_NODE)) {
+ 			xmlUnlinkNode(trav);
diff --git a/php-5.3.29-CVE-2026-129538.patch b/php-5.3.29-CVE-2026-129538.patch
new file mode 100644
index 0000000..8f2cddd
--- /dev/null
+++ b/php-5.3.29-CVE-2026-129538.patch
@@ -0,0 +1,19 @@
+CVE-2026-129538 (GHSA-5j3f-64r7-f564): php-cgi with cgi.fix_pathinfo=1 read and wrote
+before PATH_INFO when the stripped script suffix is longer than it; php-src 964cdcfa5adf
+
+diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
+index a97a0d3c3..61e1b590c 100644
+--- a/sapi/cgi/cgi_main.c
++++ b/sapi/cgi/cgi_main.c
+@@ -1197,9 +1197,9 @@ static void init_request_info(TSRMLS_D)
+ 						 */
+ 						int slen = len - strlen(pt);
+ 						int pilen = env_path_info ? strlen(env_path_info) : 0;
+-						char *path_info = env_path_info ? env_path_info + pilen - slen : NULL;
++						char *path_info = (env_path_info && pilen > slen) ? env_path_info + pilen - slen : NULL;
+ 
+-						if (orig_path_info != path_info) {
++						if (path_info && orig_path_info != path_info) {
+ 							if (orig_path_info) {
+ 								char old;
+ 
diff --git a/php-5.3.29-CVE-2026-15353.patch b/php-5.3.29-CVE-2026-15353.patch
new file mode 100644
index 0000000..9bab8c9
--- /dev/null
+++ b/php-5.3.29-CVE-2026-15353.patch
@@ -0,0 +1,16 @@
+CVE-2026-15353 (GHSA-q23r-hr55-xmpg): an SOAP-ENC:arraySize without dimensions read past the
+position array; php-src 59e46404a744
+
+diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
+index 92d9cf056..4fd166752 100644
+--- a/ext/soap/php_encoding.c
++++ b/ext/soap/php_encoding.c
+@@ -2168,7 +2168,7 @@ static int calc_dimension_12(const char* str)
+ 		}
+ 		str++;
+ 	}
+-	return i;
++	return i != 0 ? i : 1;
+ }
+ 
+ static int* get_position_12(int dimension, const char* str)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/5c15c3157ce1d538093f35198bddc80cd3beb35a



More information about the pld-cvs-commit mailing list