[media-types] Request for review of Media Type application/lzip

Antonio Diaz Diaz <antonio@gnu.org> Thu, 10 October 2019 20:32 UTC

Return-Path: <antonio@gnu.org>
X-Original-To: media-types@ietfa.amsl.com
Delivered-To: media-types@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3877A120125 for <media-types@ietfa.amsl.com>; Thu, 10 Oct 2019 13:32:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.234
X-Spam-Level:
X-Spam-Status: No, score=-1.234 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5mc9eZBnM5qT for <media-types@ietfa.amsl.com>; Thu, 10 Oct 2019 13:32:42 -0700 (PDT)
Received: from pechora6.dc.icann.org (pechora6.icann.org [192.0.46.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 81B161200EF for <media-types@ietf.org>; Thu, 10 Oct 2019 13:32:42 -0700 (PDT)
Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by pechora6.dc.icann.org (Postfix) with ESMTPS id 538FE1E0A07 for <media-types@iana.org>; Thu, 10 Oct 2019 20:32:40 +0000 (UTC)
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <antonio@gnu.org>) id 1iIf63-0001v5-OO; Thu, 10 Oct 2019 16:31:39 -0400
Received: from 11.red-176-84-63.dynamicip.rima-tde.net ([176.84.63.11]:51806 helo=[192.168.1.2]) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from <antonio@gnu.org>) id 1iIf5y-0007s8-Nh; Thu, 10 Oct 2019 16:31:35 -0400
Message-ID: <5D9F954C.9000209@gnu.org>
Date: Thu, 10 Oct 2019 22:32:12 +0200
From: Antonio Diaz Diaz <antonio@gnu.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14
MIME-Version: 1.0
To: media-types@iana.org
CC: Antonio Diaz Diaz <antonio@gnu.org>
Content-Type: text/plain; charset="ISO-8859-15"; format="flowed"
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
Archived-At: <https://mailarchive.ietf.org/arch/msg/media-types/3omIepWY_Fsjriy8GcrHoUk9C3Y>
X-Mailman-Approved-At: Thu, 10 Oct 2019 16:43:54 -0700
Subject: [media-types] Request for review of Media Type application/lzip
X-BeenThere: media-types@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "IANA mailing list for reviewing Media Type \(MIME Type, Content Type\) registration requests." <media-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/media-types>, <mailto:media-types-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/media-types/>
List-Post: <mailto:media-types@ietf.org>
List-Help: <mailto:media-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/media-types>, <mailto:media-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Oct 2019 20:49:20 -0000

Dear media types experts,

I'm about to submit an Internet Draft of an informational RFC with the 
specification of the lzip format and an IANA Considerations section 
requesting the registrations of the Media Type 'application/lzip' and the 
Content Type 'lzip'. I'm posting the IANA part of the draft here for review. 
Thanks.

The type is "widely" deployed. Most archivers support the lzip format. Many 
browsers and package managers support the media type as application/x-lzip. 
The IANA Time Zone Database[1] is distributed in lzip format (and the IANA 
server identifies the tar.lz files as application/x-lzip).
[1] http://www.iana.org/time-zones

At least one application (GNU Wget2) is implementing 'lzip' as a content 
coding for http. In fact the maintainers of Wget2 suggested me to register 
the type, which would perhaps minimize the work required in the future to 
deprecate the unregistered type application/x-lzip. I learned about the 
problems caused by the "x-" prefix at
http://tools.ietf.org/html/rfc6648#appendix-B

Thank you very much,
Antonio.


Your Full Name:                 Antonio Diaz Diaz
Your E-mail:                    antonio@gnu.org

4.1.  The 'application/lzip' Media Type

    The 'application/lzip' media type identifies a block of data that is
    compressed using lzip compression.  The data is a stream of bytes as
    described in this document.  IANA has added the following to the
    "Media Types" registry:

    Type name:  application

    Subtype name:  lzip

    Required parameters:  N/A

    Optional parameters:  N/A

    Encoding considerations:  binary

    Security considerations:  See Section 5 of RFC XXXX (copied below)

    Interoperability considerations:  N/A

    Published specification:  RFC XXXX

    Applications that use this media type:
       Any application where data size is an issue

    Fragment Identifier Considerations:  N/A

    Restrictions on Usage:  N/A

    Provisional Registrations:  N/A

    Additional information:

       Deprecated alias names for this type:  application/x-lzip

       Magic number(s):  First 4 bytes (0x4C, 0x5A, 0x49, 0x50)

       File extension(s):  .lz .tlz

       Macintosh File Type Code(s):  N/A

       Object Identifier(s) or OID(s):  N/A

    Intended Usage:  COMMON

    Other Information & Comments:  See [LZIP] (copied below)

    Author:  Antonio Diaz Diaz

    Change Controller:  IETF

4.2.  Content Encoding

    IANA has added the following entry to the "HTTP Content Coding
    Registry" within the "Hypertext Transfer Protocol (HTTP) Parameters"
    registry:

    Name:  lzip

    Description:  A stream of bytes compressed using lzip compression

    Pointer to specification text:  RFC XXXX

5.  Security Considerations

    Lzip is a compressed format.  Decompression of the data may expand it
    to a size more than 7000 times larger, risking an out-of-memory or
    out-of-disc-space condition.  Since both the gzip and lzip formats
    contain a single data stream, any steps already taken to avoid such
    attacks on application/gzip should also work on application/lzip.
    One possible measure, already implemented in some applications, is to
    set a limit to the decompressed size and stop the decompression or
    warn the user if the limit is surpassed.

    This media type does not employ any kind of "active content", but it
    can be used to compress any other media type (for example
    application/postscript) which could then be interpreted by the
    application.

    A lzip stream does not store any metadata.  Any data appended to the
    end of the stream is easily detected, and an error can be signaled.
    It is not apparent how this media type could be used to help violate
    a recipient's privacy.

    The lzip media type does not need itself any external security
    mechanisms.  But again, it can be used to compress other media types
    requiring them (for example a media type defined for storage of
    sensitive medical information).

    Because of the nature of the decoding algorithm used by lzip, it is
    easy to protect the decoder from invalid memory accesses caused by
    corruption in the input data (intentional or not).  Size limits need
    to be checked at just one place in the decompressor (the decoding of
    rep0) to prevent buffer overflows.  This has been extensively tested
    with a specialized tool (unzcrash) distributed with the lziprecover
    tool.

    The lzip data stream does not contain any size fields that can be
    faked to be smaller than the actual decompressed data in an attempt
    to trigger a buffer overflow.  (The 'Data size' field in the lzip
    trailer is only used to verify the size of the data produced as an
    error detection measure).

6.1.  Normative References

    [LZIP]     "Lzip", <http://www.nongnu.org/lzip/lzip.html>.