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

Adam Barth <ietf@adambarth.com> Tue, 25 October 2011 02:34 UTC

Return-Path: <ietf@adambarth.com>
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 59EA911E80DD for <websec@ietfa.amsl.com>; Mon, 24 Oct 2011 19:34:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.084
X-Spam-Level:
X-Spam-Status: No, score=-2.084 tagged_above=-999 required=5 tests=[AWL=0.893, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 utZ6nIII5jI8 for <websec@ietfa.amsl.com>; Mon, 24 Oct 2011 19:34:49 -0700 (PDT)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by ietfa.amsl.com (Postfix) with ESMTP id C9BF011E80B8 for <websec@ietf.org>; Mon, 24 Oct 2011 19:34:49 -0700 (PDT)
Received: by gyh20 with SMTP id 20so31351gyh.31 for <websec@ietf.org>; Mon, 24 Oct 2011 19:34:49 -0700 (PDT)
Received: by 10.151.8.21 with SMTP id l21mr4103316ybi.100.1319510089368; Mon, 24 Oct 2011 19:34:49 -0700 (PDT)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by mx.google.com with ESMTPS id e4sm68734773ani.12.2011.10.24.19.34.48 (version=SSLv3 cipher=OTHER); Mon, 24 Oct 2011 19:34:49 -0700 (PDT)
Received: by gyh20 with SMTP id 20so31335gyh.31 for <websec@ietf.org>; Mon, 24 Oct 2011 19:34:48 -0700 (PDT)
Received: by 10.236.131.106 with SMTP id l70mr37602307yhi.29.1319510088101; Mon, 24 Oct 2011 19:34:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.236.103.37 with HTTP; Mon, 24 Oct 2011 19:34:18 -0700 (PDT)
In-Reply-To: <op.v3vyn6tw64w2qv@annevk-macbookpro.local>
References: <CAJE5ia8n+B10TbjpVYbVieTWEHo3AY_pRm1EToNX_iB1+3UTCw@mail.gmail.com> <op.v3vyn6tw64w2qv@annevk-macbookpro.local>
From: Adam Barth <ietf@adambarth.com>
Date: Mon, 24 Oct 2011 19:34:18 -0700
Message-ID: <CAJE5ia_cK=W3pp=JhKjJyk5cys115RftdDYYdcrTAoBPTvFdyQ@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: websec <websec@ietf.org>
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 02:34:50 -0000

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