mod_php_install.sh: apply security patches for PHP 5.6.40.

Apply for PHP 5.6.40, in boa order: openssl3-pkey-export,
round-places-overflow, sury-105, xlts-1, xlts-2. All apply without fuzz
on top of the OpenSSL 1.1.0 compatibility patch and the php-5.6-*.patch
files.

Skip php-5.6-enhanced-universal.patch (php2shell) for 5.6.40: sury-105
brings its own backport of the CVE-2026-109618/109619 fix, the same fix
boa uses for 7.4/8.x. Both change the same code and exclude each other.

Tested on web-04 (Debian 13): build, install and php-fpm start OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrisandClaude Opus 5.5 committed 2026-11-20 20:13:05 +01:00
1 parent 7b6bb066dc
commit 5494ccc9df
1 file changed
+28 -2
+28 -2
View File
@@ -6380,9 +6380,16 @@ fi
# -
# - Security fix: if it fails, abort - never build PHP 5.6 without it.
# -
# - NOT for 5.6.40: there 'php-5.6.40-sury-105.patch' (omega8cc/boa, see
# - below) brings its own backport of the CVE-2026-109618/109619 fix - the
# - same fix boa uses for 7.4/8.x (session upload progress disabled,
# - array_init_singleton, zend_mm_safe_error_ex, MIME header filter,
# - max_multipart_body_parts, ...). Both patches change the same code and
# - exclude each other: with this patch applied, sury-105 and xlts-2 fail.
# -
_patch_file="php-5.6-enhanced-universal.patch"
echononl "\tApply ${_patch_file} (php2shell)"
if [[ "$PHP_MAIN_VERSION" = "5.6" ]]; then
if [[ "$PHP_MAIN_VERSION" = "5.6" ]] && [[ "$VERSION" != "5.6.40" ]]; then
if [[ -f "${_srcdir}/${_patch_file}" ]] ; then
patch -d $_builddir -p1 < ${_srcdir}/${_patch_file} > $tmp_err_msg 2>&1
if [[ $? -eq 0 ]]; then
@@ -6399,9 +6406,20 @@ else
echo_skipped
fi
# - Security patches for PHP 7.4.33, 8.0.30 and 8.1.34
# - Security patches for PHP 5.6.40, 7.4.33, 8.0.30 and 8.1.34
# - (source: omega8cc/boa, aegir/patches/php-sec)
# -
# - PHP 5.6.40 (boa order = glob order, applied with --fuzz=0 by boa):
# - php-5.6.40-openssl3-pkey-export.patch
# - php-5.6.40-round-places-overflow.patch
# - php-5.6.40-sury-105.patch (backports, Debian/sury; contains
# - the CVE-2026-109618/109619 fix)
# - php-5.6.40-xlts-1.patch
# - php-5.6.40-xlts-2.patch (needs sury-105 and xlts-1)
# - On top of 'PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch' and
# - the php-5.6-*.patch files above all apply without fuzz (offsets only).
# - They change no generated files (Zend VM, re2c).
# -
# - PHP 7.4.33:
# - php-7.4.33-cve-2026-109618-109619.patch
# - php-7.4.33-sury-31.patch (backports from 8.x, Debian/sury)
@@ -6445,6 +6463,14 @@ fi
# - Security fixes: if one fails, abort - never build PHP without them.
# -
case "$VERSION" in
5.6.40)
_sec_patches="
php-5.6.40-openssl3-pkey-export.patch
php-5.6.40-round-places-overflow.patch
php-5.6.40-sury-105.patch
php-5.6.40-xlts-1.patch
php-5.6.40-xlts-2.patch"
;;
7.4.33)
_sec_patches="
php-7.4.33-cve-2026-109618-109619.patch