From issues-return-67348-archive-asf-public=cust-asf.ponee.io@commons.apache.org Tue Apr 17 15:59:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4588E180649 for ; Tue, 17 Apr 2018 15:59:04 +0200 (CEST) Received: (qmail 28940 invoked by uid 500); 17 Apr 2018 13:59:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 28925 invoked by uid 99); 17 Apr 2018 13:59:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2018 13:59:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B3F08C1A06 for ; Tue, 17 Apr 2018 13:59:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id hilCXiZRiCKO for ; Tue, 17 Apr 2018 13:59:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C32135F1D5 for ; Tue, 17 Apr 2018 13:59:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C2ED5E0C51 for ; Tue, 17 Apr 2018 13:59:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 35395241C7 for ; Tue, 17 Apr 2018 13:59:00 +0000 (UTC) Date: Tue, 17 Apr 2018 13:59:00 +0000 (UTC) From: "floyd (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COMPRESS-447) ArrayIndexOutOfBoundsException in ZipFile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COMPRESS-447?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 440884#comment-16440884 ]=20 floyd commented on COMPRESS-447: -------------------------------- In the end it probably doesn't matter this much (from my security point of = view). Because when you parse an invalid zip file then that will fail anywa= y at one point and has to be communicated to the original caller. Honestly,= I think I'm not the right person to answer that, but an explicit bounds ch= eck in X7875_NewUnix sounds like a sane choice. > ArrayIndexOutOfBoundsException in ZipFile > ----------------------------------------- > > Key: COMPRESS-447 > URL: https://issues.apache.org/jira/browse/COMPRESS-447 > Project: Commons Compress > Issue Type: Bug > Components: Archivers > Reporter: floyd > Priority: Major > Attachments: 7_uncaught_ArrayIndexOutOfBoundsException_1.zip, 7_u= ncaught_ArrayIndexOutOfBoundsException_2.zip > > > As part of a fuzzing run for a larger software that uses Apache Commons C= ompress ZipFile with the AFL-based Kelinci fuzzer found at https://github.c= om/isstac/kelinci I found the following ArrayIndexOutOfBoundsException issu= es: > {code:java} > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException > =C2=A0=C2=A0 =C2=A0at java.lang.System.arraycopy(Native Method) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.X7875_New= Unix.parseFromLocalFileData(X7875_NewUnix.java:224) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.ExtraFiel= dUtils.parse(ExtraFieldUtils.java:179) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.ZipArchiv= eEntry.setExtra(ZipArchiveEntry.java:571) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.ZipFile.r= esolveLocalFileHeaderData(ZipFile.java:1042) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.ZipFile.<= init>(ZipFile.java:291) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.ZipFile.<= init>(ZipFile.java:213) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.ZipFile.<= init>(ZipFile.java:196) > =C2=A0=C2=A0 =C2=A0at org.apache.commons.compress.archivers.zip.ZipFile.<= init>(ZipFile.java:157){code} > The issue can be reproduced with the attached files. -- This message was sent by Atlassian JIRA (v7.6.3#76005)