From c262fe02b6293bdce558e1b07f94973fad80c2a6 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 1 Aug 2023 16:31:52 +0200
Subject: Fix Security issue with external entity loading in XML without
 enabling it

  GHSA-3qrf-m4j2-pcrr CVE-2023-3823
Fix Buffer mismanagement in phar_dir_read()
  GHSA-jqcx-ccgc-xwhv CVE-2023-3824
move httpd/nginx wants directive to config files in /etc
---
 php.spec | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

(limited to 'php.spec')

diff --git a/php.spec b/php.spec
index 3489684..6850d79 100644
--- a/php.spec
+++ b/php.spec
@@ -126,7 +126,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: %{?scl_prefix}php
 Version: %{upver}%{?rcver:~%{rcver}}
-Release: 26%{?dist}
+Release: 27%{?dist}
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
 # TSRM is licensed under BSD
@@ -228,6 +228,8 @@ Patch235: php-bug81744.patch
 Patch236: php-bug81746.patch
 Patch237: php-cve-2023-0662.patch
 Patch238: php-cve-2023-3247.patch
+Patch239: php-cve-2023-3823.patch
+Patch240: php-cve-2023-3824.patch
 
 # Fixes for tests (300+)
 # Factory is droped from system tzdata
@@ -997,6 +999,8 @@ sed -e 's/php-devel/%{?scl_prefix}php-devel/' -i scripts/phpize.in
 %patch -P236 -p1 -b .bug81746
 %patch -P237 -p1 -b .cve0662
 %patch -P238 -p1 -b .cve3247
+%patch -P239 -p1 -b .cve3823
+%patch -P240 -p1 -b .cve3824
 
 # Fixes for tests
 %patch -P300 -p1 -b .datetests
@@ -1513,8 +1517,8 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf.default .
 %if %{with_systemd}
 install -Dm 644 %{SOURCE6}  $RPM_BUILD_ROOT%{_unitdir}/%{?scl_prefix}php-fpm.service
 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/%{?scl_prefix}php-fpm.conf
-install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/%{?scl_prefix}php-fpm.conf
+install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_root_sysconfdir}/systemd/system/httpd.service.d/%{?scl_prefix}php-fpm.conf
+install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_root_sysconfdir}/systemd/system/nginx.service.d/%{?scl_prefix}php-fpm.conf
 %endif
 sed -e 's:/run:%{_localstatedir}/run:' \
     -e 's:/etc/sysconfig:%{_sysconfdir}/sysconfig:' \
@@ -1867,8 +1871,8 @@ EOF
 %if %{with_systemd}
 %{_unitdir}/%{?scl_prefix}php-fpm.service
 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-%{_unitdir}/httpd.service.d/%{?scl_prefix}php-fpm.conf
-%{_unitdir}/nginx.service.d/%{?scl_prefix}php-fpm.conf
+%config(noreplace) %{_root_sysconfdir}/systemd/system/httpd.service.d/%{?scl_prefix}php-fpm.conf
+%config(noreplace) %{_root_sysconfdir}/systemd/system/nginx.service.d/%{?scl_prefix}php-fpm.conf
 %endif
 %dir %{_root_sysconfdir}/systemd/system/%{?scl_prefix}php-fpm.service.d
 %else
@@ -1960,6 +1964,13 @@ EOF
 
 
 %changelog
+* Tue Aug  1 2023 Remi Collet <remi@remirepo.net> - 7.1.33-27
+- Fix Security issue with external entity loading in XML without enabling it
+  GHSA-3qrf-m4j2-pcrr CVE-2023-3823
+- Fix Buffer mismanagement in phar_dir_read()
+  GHSA-jqcx-ccgc-xwhv CVE-2023-3824
+- move httpd/nginx wants directive to config files in /etc
+
 * Wed Jun 21 2023 Remi Collet <remi@remirepo.net> - 7.1.33-26
 - fix possible buffer overflow in date
 - define %%php71___phpize and %%php71___phpconfig
-- 
cgit