Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-447

ArrayIndexOutOfBoundsException in ZipFile

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.17
    • Component/s: Archivers
    • Labels:

      Description

      As part of a fuzzing run for a larger software that uses Apache Commons Compress ZipFile with the AFL-based Kelinci fuzzer found at https://github.com/isstac/kelinci I found the following ArrayIndexOutOfBoundsException issues:

      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
          at java.lang.System.arraycopy(Native Method)
          at org.apache.commons.compress.archivers.zip.X7875_NewUnix.parseFromLocalFileData(X7875_NewUnix.java:224)
          at org.apache.commons.compress.archivers.zip.ExtraFieldUtils.parse(ExtraFieldUtils.java:179)
          at org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setExtra(ZipArchiveEntry.java:571)
          at org.apache.commons.compress.archivers.zip.ZipFile.resolveLocalFileHeaderData(ZipFile.java:1042)
          at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:291)
          at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:213)
          at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:196)
          at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:157)

      The issue can be reproduced with the attached files.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              floyd floyd
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: