Created attachment 186164 [details] upstream fix for deflate.c I've just upgraded my FreeBSD 11.0 server upto recent 11.1-STABLE without touching other software. The server runs UniFi Controller containing embedded Tomcat web server that uses gzip to compress HTML responses. After FreeBSD upgrade, it started producing broken gzip stream and "curl -vvvv --compress localhost:8880/guest/s/default/" confirms that complaining "Error while processing content unencoding: invalid block type". The problem is exactly the same described in https://bugs.launchpad.net/ubuntu/+source/zlib/+bug/1692870 that points to the upstream fix: https://github.com/madler/zlib/commit/f9694097dd69354b03cb8af959094c7f260db0a1#diff-766e4159febe3390b2e58127d6c973d3 that I've attached to this PR (deflate.c part, without comment part in zlib.h) This patch fixes the problem.
delphij privetely reported not being able to test/commit this handily and 10.4 release cycle is rolling fast, so re-assign this to the Release Engineering team.
A commit references this bug: Author: marius Date: Sun Sep 10 01:25:16 UTC 2017 New revision: 323382 URL: https://svnweb.freebsd.org/changeset/base/323382 Log: MFV: r323381 Permit a deflateParams() parameter change as soon as possible. This change fixes compression errors seen when the embedded Tomcat web server of a UniFi Controller zlib compresses responses. Given that Tomcat just uses Java/OpenJDK which in turn employs zlib for its compression/decompression support, this bug might very well affect other applications, too. PR: 222136 Changes: _U head/contrib/zlib/ head/contrib/zlib/deflate.c head/contrib/zlib/zlib.h
A commit references this bug: Author: marius Date: Wed Sep 13 21:21:33 UTC 2017 New revision: 323563 URL: https://svnweb.freebsd.org/changeset/base/323563 Log: MFC: 323382, MFV: r323381 Permit a deflateParams() parameter change as soon as possible. This change fixes compression errors seen when the embedded Tomcat web server of a UniFi Controller zlib compresses responses. Given that Tomcat just uses Java/OpenJDK which in turn employs zlib for its compression/decompression support, this bug might very well affect other applications, too. PR: 222136 Changes: _U stable/11/ stable/11/contrib/zlib/deflate.c stable/11/contrib/zlib/zlib.h
A commit references this bug: Author: marius Date: Wed Sep 13 21:56:49 UTC 2017 New revision: 323565 URL: https://svnweb.freebsd.org/changeset/base/323565 Log: MFC: r323382, MFV: r323381 Permit a deflateParams() parameter change as soon as possible. This change fixes compression errors seen when the embedded Tomcat web server of a UniFi Controller zlib compresses responses. Given that Tomcat just uses Java/OpenJDK which in turn employs zlib for its compression/decompression support, this bug might very well affect other applications, too. PR: 222136 Approved by: re (gjb) Changes: _U stable/10/ stable/10/contrib/zlib/deflate.c stable/10/contrib/zlib/zlib.h
Eugene, should we issue an EN for this one?
(In reply to Xin LI from comment #5) I'm not sure. Ubuntu had this problem reported and unfixed for half a year and no catastrophe occured. We had it committed and MFC'd for half a year too and I found no reports in our Bugzilla. It seems the problem is not so fearsome.