php

Zlib functions (gzopen etc.) are undefined while gzopen64 etc. exist

Bug #1315888 reported by Ville Mattila
180
This bug affects 32 people
Affects Status Importance Assigned to Milestone
php
Unknown
Unknown
php5 (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

Distribution: 14.04 - 32bit version
Actual package versions: 5.5.9+dfsg-1ubuntu4

[Impact]

After upgrading to 14.04, all function Zlib-related function calls (gzopen() etc) fail with "Fatal error: Call to undefined function gzopen() in ...". Function names with 64 added to the end to them (gzopen64() etc) work as expected.

By #undef-ing the zlib-related function calls, the internal rename to *64() does not occur in PHP5.

[Test Case]

On a i386 system:

php -r 'var_dump(function_exists("gzopen"));

Before:
bool(false)

After:
bool(true)

[Regression Potential]

The only source of potential regression is if, as a workaround, an end-user modified their code on i386 to use the *64() APIs that were now exposed. This should not be common, and was not done in any official Ubuntu packages.

Ville Mattila (vjom)
summary: - Zlib functions (gzopen etc.) are undefined
+ Zlib functions (gzopen etc.) are undefined while gzopen64 etc. exist
description: updated
Revision history for this message
Ondřej Surý (ondrej) wrote :

This is known upstream problem:

https://bugs.php.net/bug.php?id=53829

We should probably enable the patch in the Debian build when we unbreak the LFS build.

Robie Basak (racb)
Changed in php5 (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Ondřej Surý (ondrej) wrote :

This the patch[1], and please do S-P-U fast as this breaks many downstream packages.

1. http://anonscm.debian.org/cgit/pkg-php/php.git/tree/debian/patches/zlib-largefile-function-renaming.patch

Changed in php5 (Ubuntu):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in php5 (Ubuntu Trusty):
assignee: nobody → Dimitri John Ledkov (xnox)
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Beat (beat-c) wrote :
Revision history for this message
Knah Tsaeb (knah-tsaeb) wrote :
Revision history for this message
Thomas P (tpxp) wrote :

This bug also affects phpmyadmin as it disables GZipped files export or import.

Revision history for this message
Knah Tsaeb (knah-tsaeb) wrote :

This bug affect DokuWiki too at multi level (extension,update,archive).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in phpmyadmin (Ubuntu Trusty):
status: New → Confirmed
Changed in phpmyadmin (Ubuntu):
status: New → Confirmed
Revision history for this message
bersyl91 (choppy-free) wrote :

This bug affect SPIP too at multi level.

Revision history for this message
sam (samer-mirror) wrote :

In a specific case, having this issue, it was workarounded by replacing the calls to "gzopen" with "gzopen64":
https://wordpress.org/support/topic/missing-zlib-extensions-php-error

I tested in my Wordpress installation and it worked perfectly, while other solutions didn't. HTH.

Revision history for this message
Robie Basak (racb) wrote :

Unassigning xnox as no progress has been need. This bug is open for another person or team to take. It's on the server team's backlog.

Revision history for this message
Robie Basak (racb) wrote :

> Unassigning xnox as no progress has been need.

I meant "no progress has been made".

Changed in php5 (Ubuntu):
assignee: Dimitri John Ledkov (xnox) → nobody
Changed in php5 (Ubuntu Trusty):
assignee: Dimitri John Ledkov (xnox) → nobody
Revision history for this message
chrisnet46 (chrisnet46) wrote :

This bug affects GLPI, unable to backup database. I had to replace gzopen with gzopen64 in vi /var/www/glpi/front/backup.php

Revision history for this message
Heineken (lars-heineken) wrote :

The bug also breaks the GeoIP download function of the popular WP Statistics plugin:
https://wordpress.org/support/topic/blank-settings-page-after-geoip-activation?replies=37

Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty

Revision history for this message
Heineken (lars-heineken) wrote :

The bug was assigned to nobody more than half a year ago. Will it be picked-up by someone anytime soon?
I'm willing to help in any way possible.

Revision history for this message
Robie Basak (racb) wrote :

This needs someone to prepare and test a debdiff and follow https://wiki.ubuntu.com/StableReleaseUpdates#Procedure. This is a requirement for any updates to the stable release so that we reduce the risk of regression unaffected users. If you can help with any of this, please do!

When preparing the quilt patch for the debdiff, please use dep3 headers: http://dep.debian.net/deps/dep3/

Thanks

Revision history for this message
Robie Basak (racb) wrote :

(also we need to fix this in a way that does impact existing users; rebuilding without LFS isn't really sufficient as I understand the problem)

Revision history for this message
Nish Aravamudan (nacc) wrote :
Revision history for this message
Nish Aravamudan (nacc) wrote :

Test builds are going at: https://launchpad.net/~nacc/+archive/ubuntu/lp1315888, please consider testing if the resulting php5 does fix the issue for you.

Revision history for this message
Nish Aravamudan (nacc) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "php5_5.5.9+dfsg-1ubuntu4.14.5.5.9+dfsg-1ubuntu4.15.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Heineken (lars-heineken) wrote :

The test build at: https://launchpad.net/~nacc/+archive/ubuntu/lp1315888 works fine, that you very much for your effort!

Changed in php5 (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in php5 (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Nish Aravamudan (nacc) wrote : Re: [Bug 1315888] Re: Zlib functions (gzopen etc.) are undefined while gzopen64 etc. exist

On 26.03.2016 [00:04:59 -0000], Heineken wrote:
> The test build at: https://launchpad.net/~nacc/+archive/ubuntu/lp1315888
> works fine, that you very much for your effort!

Thank you very much for you testing! I have been pretty heads-down with
PHP7 and 16.04, but will file a SRU as soon as I can.

-Nish

Heineken (lars-heineken)
Changed in php5 (Ubuntu):
status: In Progress → Confirmed
Changed in php5 (Ubuntu Trusty):
status: In Progress → Confirmed
Nish Aravamudan (nacc)
description: updated
Changed in php5 (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Michael Terry (mterry) wrote :

Nish, since you are busy, and your patch seems fine, I've uploaded it to trusty for ya. Thanks for the patch!

Changed in php5 (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in php5 (Ubuntu):
status: In Progress → Invalid
Changed in phpmyadmin (Ubuntu):
status: Confirmed → Invalid
Changed in phpmyadmin (Ubuntu Trusty):
status: Confirmed → Invalid
Mathew Hodson (mhodson)
description: updated
tags: added: regression-release
affects: wordpress → ubuntu-translations
no longer affects: ubuntu-translations
no longer affects: php5 (Ubuntu)
no longer affects: phpmyadmin (Ubuntu)
no longer affects: phpmyadmin (Ubuntu Trusty)
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Ville, or anyone else affected,

Accepted php5 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/php5/5.5.9+dfsg-1ubuntu4.15 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in php5 (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Unfortunately today's security update superseded the package in proposed. A new upload to -proposed is required.

Revision history for this message
Nish Aravamudan (nacc) wrote :
Revision history for this message
Nish Aravamudan (nacc) wrote :

@mdeslaur, thank you for notifying me, updated debdiff attached!

Mathew Hodson (mhodson)
Changed in php5 (Ubuntu Trusty):
status: Fix Committed → Triaged
Revision history for this message
Michael Terry (mterry) wrote :

I just uploaded Nish's new patch to trusty-proposed. Thanks!

Revision history for this message
Mathew Hodson (mhodson) wrote : Fixed upstream

This was fixed in upstream version 5.5.20 and version 5.6.4. Vivid has
version 5.6.4, and Wily has 5.6.11, so the fix should be in those releases.

 affects ubuntu/php5

Changed in php5 (Ubuntu):
importance: Undecided → High
status: New → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

In Trusty queue -> In Progress.

Changed in php5 (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Mathew Hodson (mhodson) wrote :

It looks like this was removed from the upload queue.

Changed in php5 (Ubuntu Trusty):
status: In Progress → Triaged
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I've re-uploaded this to the trusty upload queue with the debdiff in comment #27, but with a fixed version number. Thanks!

Changed in php5 (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Ville, or anyone else affected,

Accepted php5 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/php5/5.5.9+dfsg-1ubuntu4.18 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in php5 (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [php5/trusty] possible regression found

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of php5 from trusty-proposed was performed and bug 1603750 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and add the tag "bot-stop-nagging" to bug 1603750 (not this bug). Thanks!

tags: added: verification-failed
Nish Aravamudan (nacc)
tags: removed: verification-failed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.6 KiB)

This bug was fixed in the package php5 - 5.5.9+dfsg-1ubuntu4.19

---------------
php5 (5.5.9+dfsg-1ubuntu4.19) trusty-security; urgency=medium

  * SECURITY UPDATE: segfault in SplMinHeap::compare
    - debian/patches/CVE-2015-4116.patch: properly handle count in
      ext/spl/spl_heap.c, added test to ext/spl/tests/bug69737.phpt.
    - CVE-2015-4116
  * SECURITY UPDATE: denial of service via recursive method calls
    - debian/patches/CVE-2015-8873.patch: add limit to
      Zend/zend_exceptions.c, add tests to
      ext/standard/tests/serialize/bug69152.phpt,
      ext/standard/tests/serialize/bug69793.phpt,
      sapi/cli/tests/005.phpt.
    - CVE-2015-8873
  * SECURITY UPDATE: denial of service or code execution via crafted
    serialized data
    - debian/patches/CVE-2015-8876.patch: fix logic in
      Zend/zend_exceptions.c, added test to Zend/tests/bug70121.phpt.
    - CVE-2015-8876
  * SECURITY UPDATE: XSS in header() with Internet Explorer (LP: #1594041)
    - debian/patches/CVE-2015-8935.patch: update header handling to
      RFC 7230 in main/SAPI.c, added tests to
      ext/standard/tests/general_functions/bug60227_*.phpt.
    - CVE-2015-8935
  * SECURITY UPDATE: get_icu_value_internal out-of-bounds read
    - debian/patches/CVE-2016-5093.patch: add enough space in
      ext/intl/locale/locale_methods.c, added test to
      ext/intl/tests/bug72241.phpt.
    - CVE-2016-5093
  * SECURITY UPDATE: integer overflow in php_html_entities()
    - debian/patches/CVE-2016-5094.patch: don't create strings with lengths
      outside int range in ext/standard/html.c.
    - CVE-2016-5094
  * SECURITY UPDATE: string overflows in string add operations
    - debian/patches/CVE-2016-5095.patch: check for size overflow in
      Zend/zend_operators.c.
    - CVE-2016-5095
  * SECURITY UPDATE: int/size_t confusion in fread
    - debian/patches/CVE-2016-5096.patch: check string length in
      ext/standard/file.c, added test to
      ext/standard/tests/file/bug72114.phpt.
    - CVE-2016-5096
  * SECURITY UPDATE: memory leak and buffer overflow in FPM
    - debian/patches/CVE-2016-5114.patch: check buffer length in
      sapi/fpm/fpm/fpm_log.c.
    - CVE-2016-5114
  * SECURITY UPDATE: proxy request header vulnerability (httpoxy)
    - debian/patches/CVE-2016-5385.patch: only use HTTP_PROXY from the
      local environment in ext/standard/basic_functions.c, main/SAPI.c,
      main/php_variables.c.
    - CVE-2016-5385
  * SECURITY UPDATE: inadequate error handling in bzread()
    - debian/patches/CVE-2016-5399.patch: do not allow reading past error
      read in ext/bz2/bz2.c.
    - CVE-2016-5399
  * SECURITY UPDATE: double free in _php_mb_regex_ereg_replace_exec
    - debian/patches/CVE-2016-5768.patch: check pointer in
      ext/mbstring/php_mbregex.c, added test to
      ext/mbstring/tests/bug72402.phpt.
    - CVE-2016-5768
  * SECURITY UPDATE: integer overflows in mcrypt
    - debian/patches/CVE-2016-5769.patch: check for overflow in
      ext/mcrypt/mcrypt.c.
    - CVE-2016-5769
  * SECURITY UPDATE: ese after free GC algorithm and unserialize
    - debian/patches/CVE-2016-5771.patch: added new handler in
      ext/spl/spl_array.c, added test to Zend/tes...

Read more...

Changed in php5 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
tags: removed: verification-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.