[arch-commits] Commit in uwsgi/trunk (PKGBUILD fix-php74.patch)

Sven-Hendrik Haase svenstaro at archlinux.org
Thu Dec 12 05:36:30 UTC 2019


    Date: Thursday, December 12, 2019 @ 05:36:29
  Author: svenstaro
Revision: 537213

upgpkg: uwsgi 2.0.18-6: Try fixing FS#64696

Added:
  uwsgi/trunk/fix-php74.patch
Modified:
  uwsgi/trunk/PKGBUILD

-----------------+
 PKGBUILD        |    8 +++++---
 fix-php74.patch |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-12 05:12:32 UTC (rev 537212)
+++ PKGBUILD	2019-12-12 05:36:29 UTC (rev 537213)
@@ -1,5 +1,5 @@
 # Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Maintainer: Sven-Hendrik Haase <svenstaro at gmail.com>
 # Contributor: Valentin Hăloiu <vially.ichb+aur at gmail.com>
 # Contributor: Angel Velasquez <angvp at archlinux.org>
 # Contributor: Kevin Zuber <uKev at knet.eu>
@@ -22,7 +22,7 @@
          uwsgi-plugin-zabbix
          uwsgi-plugin-notfound)
 pkgver=2.0.18
-pkgrel=5
+pkgrel=6
 arch=(x86_64)
 url="http://projects.unbit.it/$pkgbase"
 license=(GPL2)
@@ -39,6 +39,7 @@
         uwsgi_at.service
         uwsgi_at.socket
         uwsgi_ruby20_compatibility.patch
+        fix-php74.patch
         uwsgi_trick_chroot.patch
         emperor.ini
         emperor.uwsgi.service
@@ -52,6 +53,7 @@
             'c0c1a5c2d31cdb7e0dc878ea3d0b6025532fb640ae7cf4d5f1eed2f89987e625c8dc7844d367283ed560fb3ef37915e3e9199be2e1b06fc4586ca862a653b4b5'
             'fb51a4d102a1bc7d9f7d4c4f310ee65076bcfbc94b47e2dafdf9b20e99a661c5f938185dcf698437d81409376f0276b966f09b13c8a29462c48612df43c3f3ef'
             '162ca1be96282b32e8e6be919b6315bfd08954c491056958985bf99e7f5bdad3511665f059329d6cb6ef5d222f9aa11d4dc43c72e6a963ab941ada959fe8d964'
+            '52a9c2e5d5c3841d22d4e87f46c7a1e9de0350bb2aca854b899d5729132156116ab4db4ca7d99d79aacf846812adf0db0c4f7cedf4575767266a713e622827a6'
             'bc30f8ec69abd14fb96ada5b36cf65811a7a63ee27e224fcb6ceabe9935c1f17379cd872149a17da3d590b8ff60fbe7f77140d777aaf06e25e83388f897f611d'
             'd54c84838ddb2f389e115ebb81aa2583705c9e330f020e6583b496f9c271ed236b6820c2a065f2b55a79adbf13e262b9ff2428124a8044b8fa20ca29ca4930ac'
             '83a6859d729bf186236aaa7fb7433415f6b985f17e05b7ac571d8919bbf1fb9bd577b4f673d9787dea09752e3d8043f47ce3d9c7d5690faaa1365e477e6c9388'
@@ -62,7 +64,7 @@
 prepare() {
     cd $srcdir/$pkgbase-$pkgver
     cp $srcdir/archlinux.ini buildconf/archlinux.ini
-    for patch in uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch; do
+    for patch in fix-php74.patch uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch; do
         msg2 "Applying $patch"
         patch -Np1 -i $srcdir/$patch
     done

Added: fix-php74.patch
===================================================================
--- fix-php74.patch	                        (rev 0)
+++ fix-php74.patch	2019-12-12 05:36:29 UTC (rev 537213)
@@ -0,0 +1,39 @@
+From c4a2ad579a2fe5d357f2d6486c1afe84ef18a029 Mon Sep 17 00:00:00 2001
+From: Arne Welzel <arne.welzel at gmail.com>
+Date: Sun, 8 Dec 2019 12:59:45 +0100
+Subject: [PATCH] php: Properly zero initialize zend_file_handle
+
+In the PHP bugtracker [1], the stacktrace included a bogus pointer value
+being passed to `_efree`. The ASCII value of the pointer is "02.11.81"
+which heavily pointed at usage of non-initialized data.
+
+    #1  0x00007f8fe07e9e96 in _efree (ptr=0x30322e31312e3831) at /data/work/php-src-php-7.4.0RC6/Zend/zend_alloc.c:2549
+
+The solution is to use an open-coded version of`zend_stream_init_filename()` [2].
+Maybe we could actually use the above helper, but I'm not familiar enough
+with PHP/versions/compat, so the proposed change seems safer.
+
+Should fix #2096.
+
+[1] https://bugs.php.net/bug.php?id=78828
+[2] https://github.com/php/php-src/blob/bc6e4b6c574261188519a1e83ba49998ffbcb12b/Zend/zend_stream.c#L70
+---
+ plugins/php/php_plugin.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
+index 72c390223..1690fb60c 100644
+--- a/plugins/php/php_plugin.c
++++ b/plugins/php/php_plugin.c
+@@ -1115,10 +1115,9 @@ int uwsgi_php_request(struct wsgi_request *wsgi_req) {
+ 
+ 	SG(request_info).path_translated = wsgi_req->file;
+ 
++        memset(&file_handle, 0, sizeof(zend_file_handle));
+         file_handle.type = ZEND_HANDLE_FILENAME;
+         file_handle.filename = real_filename;
+-        file_handle.free_filename = 0;
+-        file_handle.opened_path = NULL;
+ 
+         if (php_request_startup(TSRMLS_C) == FAILURE) {
+ 		uwsgi_500(wsgi_req);



More information about the arch-commits mailing list