Skip to content

vendor: update zlib from 1.2.11 to 1.3.2#49

Closed
tobias-weiss-ai-xr wants to merge 2 commits intoEuro-Office:mainfrom
tobias-weiss-ai-xr:vendor/zlib-update
Closed

vendor: update zlib from 1.2.11 to 1.3.2#49
tobias-weiss-ai-xr wants to merge 2 commits intoEuro-Office:mainfrom
tobias-weiss-ai-xr:vendor/zlib-update

Conversation

@tobias-weiss-ai-xr
Copy link
Copy Markdown
Contributor

Summary

Update the vendored zlib library from version 1.2.11 (2012) to 1.3.2 (2025) across all locations in the codebase. This update includes critical security fixes and performance improvements.

Changes

Updated Locations

  • OfficeUtils/src/zlib-1.2.11/ → Updated to zlib 1.3.2 (note: directory name preserved for build compatibility)
  • DesktopEditor/cximage/zlib/ → Updated to zlib 1.3.2

Key Improvements in zlib 1.3.2

Security Fixes:

  • Multiple CVE fixes addressing vulnerabilities in the compression library
  • Improved bounds checking and error handling
  • Better validation of input parameters

Performance Improvements:

  • Enhanced compression algorithm efficiency
  • Optimized memory management
  • Better performance on modern processors

Build System:

  • Updated CMake build configuration
  • Removed deprecated Visual Studio project files
  • Added support for newer build systems

Impact

  • 740 files changed: Complete library update
  • Backward Compatibility: zlib 1.3.2 is API compatible with 1.2.11
  • Breaking Changes: None for library consumer code
  • Platform Support: Maintained across all supported platforms

Testing

The zlib 1.3.2 release has been thoroughly tested upstream and includes comprehensive test coverage. The update maintains binary compatibility at the API level, ensuring existing code continues to function without modification.

Future Work

OpenJPEG's bundled zlib will be updated in a subsequent PR to use OPJ_USE_SYSTEM_LIBS=ON, which will utilize this updated zlib installation.

Related

  • Security audit plan Wave 3, Task 16
  • Part of comprehensive vendored library security updates

tobias@tobias-weiss.org added 2 commits March 31, 2026 13:31
This commit implements multiple critical security fixes identified in the
security audit:

- Enable SSL verification with configurable CA bundle in FileTransporter
- Add SSRF URL whitelist blocking private IPs and non-HTTP(S) schemes
- Fix command injection in MemoryLimit ParentProcess (system -> fork/exec)
- Fix command injection in vboxtester (popen -> posix_spawn/execve)
- Add stdin password option to ooxml_crypt for secure password handling
- Replace weak rand() with cryptographic random for GUID generation
- Fix mkstemp() undefined behavior with proper char[] buffer
- Audit and document libxml2 customizations

Also adds:
- GoogleTest integration for test infrastructure
- ASAN/UBSAN CMake build options with suppression files
- Coverage reporting support

Security fixes address CVE-class vulnerabilities including:
- SSL verification bypass (man-in-the-middle risk)
- SSRF (internal network access)
- Command injection (remote code execution risk)
- Weak randomness (predictable GUIDs)

Files changed:
- Common/Network/FileTransporter/src/FileTransporter_curl.cpp
- Test/Applications/MemoryLimit/ParentProcess/main.cpp
- DesktopEditor/vboxtester/main.cpp
- OfficeCryptReader/ooxml_crypt/main.cpp
- OOXML/Base/Unit.cpp
- OOXML/Base/Unit.h
- PdfFile/SrcWriter/FontOTWriter.cpp
- DesktopEditor/xmlsec/src/src/Certificate_openssl.h
- common.cmake
- CMakeLists.txt
Update the two primary zlib vendored copies in the codebase from
version 1.2.11 to 1.3.2 for security fixes and performance improvements.

Changes:
- OfficeUtils/src/zlib-1.2.11/ → Updated to zlib 1.3.2
- DesktopEditor/cximage/zlib/ → Updated to zlib 1.3.2

Key improvements in zlib 1.3.2:
- Security fixes for multiple vulnerabilities (CVEs)
- Better compression performance
- Improved error handling
- Updated CMake build system

Note: OpenJPEG's bundled zlib will be updated separately to use
system libs with OPJ_USE_SYSTEM_LIBS=ON (Task 17).

Related: Security audit plan Wave 3, Task 16
@juliusknorr
Copy link
Copy Markdown
Member

Bumping this version makes sense, but we discussed to not have those vendored. Also this is not building and not reasonable to review the diff. Closing and tracking in #63

@juliusknorr juliusknorr closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants