Re: [websec] Issue 17: Registry for magic numbers

Tobias Gondrom <tobias.gondrom@gondrom.org> Tue, 25 October 2011 04:10 UTC

Return-Path: <tobias.gondrom@gondrom.org>
X-Original-To: websec@ietfa.amsl.com
Delivered-To: websec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BD3DD21F8AD1 for <websec@ietfa.amsl.com>; Mon, 24 Oct 2011 21:10:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -96.641
X-Spam-Level:
X-Spam-Status: No, score=-96.641 tagged_above=-999 required=5 tests=[AWL=0.137, BAYES_00=-2.599, FH_HELO_EQ_D_D_D_D=1.597, HELO_DYNAMIC_IPADDR=2.426, HELO_EQ_DE=0.35, HELO_MISMATCH_DE=1.448, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YsM0jFzV2wPY for <websec@ietfa.amsl.com>; Mon, 24 Oct 2011 21:10:46 -0700 (PDT)
Received: from lvps83-169-7-107.dedicated.hosteurope.de (www.gondrom.org [83.169.7.107]) by ietfa.amsl.com (Postfix) with ESMTP id 969B021F8ABE for <websec@ietf.org>; Mon, 24 Oct 2011 21:10:45 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gondrom.org; b=LuTsDkFPceyawuQqLKhmBhhttHd5OfVJ7HiMS9rCrqvd2xfOKYc0Rod7zhnQpkJuIBWCg4x4p7PWh4P0pLO5ov1RnRBF6/stYjnXaJz62QU7QfiXytVdwPVKpQo83/uG; h=Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding;
Received: (qmail 9242 invoked from network); 25 Oct 2011 06:10:11 +0200
Received: from unknown (HELO ?10.5.5.61?) (61.8.220.69) by www.gondrom.org with (DHE-RSA-AES256-SHA encrypted) SMTP; 25 Oct 2011 06:10:11 +0200
Message-ID: <4EA636A3.7060102@gondrom.org>
Date: Tue, 25 Oct 2011 05:10:11 +0100
From: Tobias Gondrom <tobias.gondrom@gondrom.org>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110923 Thunderbird/7.0
MIME-Version: 1.0
To: websec@ietf.org
References: <CAJE5ia8n+B10TbjpVYbVieTWEHo3AY_pRm1EToNX_iB1+3UTCw@mail.gmail.com> <op.v3vyn6tw64w2qv@annevk-macbookpro.local> <CAJE5ia_cK=W3pp=JhKjJyk5cys115RftdDYYdcrTAoBPTvFdyQ@mail.gmail.com>
In-Reply-To: <CAJE5ia_cK=W3pp=JhKjJyk5cys115RftdDYYdcrTAoBPTvFdyQ@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: Re: [websec] Issue 17: Registry for magic numbers
X-BeenThere: websec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport <websec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/websec>, <mailto:websec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/websec>
List-Post: <mailto:websec@ietf.org>
List-Help: <mailto:websec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/websec>, <mailto:websec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Oct 2011 04:10:46 -0000

On 25/10/11 03:34, Adam Barth wrote:
> On Mon, Oct 24, 2011 at 7:32 PM, Anne van Kesteren<annevk@opera.com>  wrote:
>> On Tue, 25 Oct 2011 11:21:35 +0900, Adam Barth<ietf@adambarth.com>  wrote:
>>> http://trac.tools.ietf.org/wg/websec/trac/ticket/17 refers to an IANA
>>> registry with magic numbers for various media types.  I wanted to
>>> compare them to what's in the draft, but I couldn't find it.  I found
>>> the media type registry, e.g., for images:
>>>
>>> http://www.iana.org/assignments/media-types/image/index.html
>>>
>>> but I don't see any magic numbers.  Would someone be willing to point
>>> me in the right direction?
>> I don't think using a registry is a good idea. When a new MIME type comes
>> along it needs to be determined at that point whether or not we want to
>> sniff for it. E.g. for image/svg+xml, a new image MIME type, we decided we
>> would not sniff for it.
>>
>> I suppose we could somehow encode all that information in a registry, but I
>> do not see it making things any better for implementors.
> Yeah, I don't think a registry is a good idea either.  Constructing
> these signatures is too subtle, but I wanted to give the idea a fair
> shake.  Looking at the existing registry will give us a sense for its
> quality.
>
> Adam
> _______________________________________________
> websec mailing list
> websec@ietf.org
> https://www.ietf.org/mailman/listinfo/websec

The existing registry is here:
http://www.iana.org/assignments/media-types/index.html
And if you want to see how things look like for one Mime-type:
e.g. for html: http://events.linkedin.com/Ietf-82/pub/803707
(as you can see it is very short and easy to register a mime-type...)

On a technical note:
There might be a good reason for the registry over only by RFC: The RFC 
will remain static (though you can update it with another draft, this 
should not necessarily be the main intention from the get-go doing on a 
regular basis).
A registry is dynamic, so you can add information easily later (by RFC 
or expert review, ...) - adding mime-types is easy and we could enrich 
the registration of mime-types by the information you need to decide on 
whether to sniff and how....

Kind regards, Tobias