JDK-8315828 : Release Note: Validations on ZIP64 Extra Fields
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version:
    11.0.20,11.0.20-oracle,17.0.8,17.0.8-oracle,21 11.0.20,11.0.20-oracle,17.0.8,17.0.8-oracle,21
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2023-09-07
  • Updated: 2023-09-14
  • Resolved: 2023-09-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 21
11.0.20-oracleResolved 17.0.8-oracleResolved 21Resolved
Description
A (JDK enhancement)[https://bugs.openjdk.org/browse/JDK-8311940] has improved validation of the ZIP64 Extra Fields contained within zip files and jar files. Files which do not satisfy these new validation checks may result in `ZipException : Invalid CEN header (invalid zip64 extra data field size)`.

The following third party tools have released patches to better adhere to the ZIP File Format Specification:
- Apache Commons Compress fix for Empty CEN Zip64 Extra Headers fixed in Commons Compress release 1.11
- Apache Ant fix for Empty CEN Zip64 Extra Headers fixed in Ant 1.10.14              
- BND issue with writing invalid Extra Headers fixed in BND 5.3
- The maven-bundle-plugin 5.1.5 includes the BND 5.3 patch.
 
If these improved validation checks cause issues for deployed zip or jar files, check how the file was created and whether patches are available from the generating software to resolve the issue. The new validation checks can be disabled by adding `-Djdk.util.zip.disableZip64ExtraFieldValidation=true` to the runtime launcher arguments.

Further modification of validations on ZIP64 Extra Fields contained within zip and jar files will be made in the upcoming JDK release. See JDK-8313765.