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

Antonio Diaz Diaz <antonio@gnu.org> Thu, 27 April 2023 23:26 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 862F5C151B00 for <media-types@ietfa.amsl.com>; Thu, 27 Apr 2023 16:26:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.388
X-Spam-Level:
X-Spam-Status: No, score=-4.388 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gnu.org
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1_u1t-WXtmtx for <media-types@ietfa.amsl.com>; Thu, 27 Apr 2023 16:26:45 -0700 (PDT)
Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) (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 F298EC151541 for <media-types@ietf.org>; Thu, 27 Apr 2023 16:26:44 -0700 (PDT)
Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <antonio@gnu.org>) id 1psB0Z-0007fC-Np; Thu, 27 Apr 2023 19:26:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:MIME-Version:From:Date:in-reply-to: references; bh=Ly9dhd11OKgSzHO5Hyx7f0uwVcbpaov646ZUoCygiQY=; b=E6+X+vGBlFvGMA WBC8XOmGGcdjWeJ0dxdPHFZlV1rCO3EjkiZFDW176CmkXPYa/0ua90kHD0EEa9ox2JWU0XYT9cfWs b3foz6cUB//h0R6Xs9GsQv4iaIdvoKWmI/iRaA1ieZRRDGaYk6QPlVzV5XJSAkoP7RRXUMpF9sY2C Ac07DSruP2h3/eBJ83d/eer7dbw+Zst0mp84FEdHBLZvDoH36egKEh5MrNZXD3ma4ut6XscIcAQLX OOazfAuOxV/r3QphDdBzMlPHy+rRLX7u7/NUbXl+sARZAEte5q9RMNRpWL5FVyXuqsC6A5WSm1+AM 4TcS6MHV2J7Tx79RKx5w==;
Received: from 93.red-81-34-173.dynamicip.rima-tde.net ([81.34.173.93] helo=[192.168.1.2]) by fencepost.gnu.org with esmtpsa (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from <antonio@gnu.org>) id 1psB0Y-0003yf-V4; Thu, 27 Apr 2023 19:26:39 -0400
Message-ID: <644B04DC.8060503@gnu.org>
Date: Fri, 28 Apr 2023 01:27:24 +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@ietf.org
CC: Antonio Diaz Diaz <antonio@gnu.org>
Content-Type: text/plain; charset="ISO-8859-15"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/media-types/uv9sVTbxsMKnhxRUrNrLP6utUL0>
Subject: [media-types] Request for review of Media Type application/lzip
X-BeenThere: media-types@ietf.org
X-Mailman-Version: 2.1.39
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, 27 Apr 2023 23:26:49 -0000

Dear media types reviewers,

I'm trying to publish draft-diaz-lzip[1] as a RFC so that I can register at 
IANA a media type, a content coding, and a structured syntax suffix for lzip 
compressed data.

[1] https://datatracker.ietf.org/doc/draft-diaz-lzip/

I wrote to media-types@iana.org some time ago[2], but I didn't receive an 
answer, so I'm writing again here.

[2] 
https://mailarchive.ietf.org/arch/msg/media-types/3omIepWY_Fsjriy8GcrHoUk9C3Y

I'm posting the IANA part of the draft here for review. Could you please let 
me know if this media type proposal is OK? 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[3] is distributed in lzip format (and the IANA 
server identifies the tar.lz files as application/x-lzip).
[3] http://www.iana.org/time-zones

At least one application (GNU wget) has implemented 'lzip' as a content 
coding for http. In fact the maintainers of wget suggested me to register 
the type.

Thank you in advance,
Antonio Diaz.


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 are a stream of bytes as
    described in this document.  IANA is asked to add the following entry
    to the standards tree of 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 this RFC

    Interoperability considerations:  N/A

    Published specification:  this RFC

    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 (equivalent to tar.lz)

       Macintosh File Type Code(s):  N/A

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

    Intended Usage:  COMMON

    Other Information & Comments:  See [LZIP]

    Author:  Antonio Diaz Diaz

    Change Controller:  IETF

4.2.  Content Encoding

    IANA is asked to add 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:  this RFC

4.3.  Structured Syntax Suffix

    IANA is asked to add the following entry to the "Structured Syntax
    Suffix" registry:

    Name:  lzip

    +suffix:  +lzip

    References:  this RFC

    Encoding Considerations:  binary

    Interoperability Considerations:  N/A

    Fragment Identifier Considerations:
       The syntax and semantics of fragment identifiers specified for
       +lzip should be as specified for 'application/lzip'.
       (At publication of this document, there is no fragment
       identification syntax defined for 'application/lzip'.)

    Security Considerations:  See Section 5 of this RFC

    Contact:  See Author's Address of this RFC

    Author/Change Controller:  IETF

5.  Security Considerations

    Lzip is a compressed format.  Decompressing lzip data may expand them
    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 non-lzip 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 inherent safety has been
    extensively tested in the reference implementation.

    The 'data size' field in the lzip trailer can be faked to be smaller
    than the actual decompressed data in an attempt to trigger a buffer
    overflow.  This is not a problem for most lzip decompressors
    (including the reference implementation) because they use 'data size'
    only to verify the size of the data produced, as an error detection
    measure.  However, any application that tries to decompress a whole
    member in memory must not trust 'data size' and must always avoid
    decompressing beyond the end of the buffer because, even if 'data
    size' is correct, decompressing corrupt data may produce more
    decompressed data than expected, and may cause a buffer overflow.

6.1.  Normative References

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