Re: [websec] Issue 17: Registry for magic numbers
Adam Barth <ietf@adambarth.com> Tue, 25 October 2011 04:24 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 7A02411E80D5 for <websec@ietfa.amsl.com>; Mon, 24 Oct 2011 21:24:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.009
X-Spam-Level:
X-Spam-Status: No, score=-2.009 tagged_above=-999 required=5 tests=[AWL=0.668, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, 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 8cm0CuXvpu6X for <websec@ietfa.amsl.com>; Mon, 24 Oct 2011 21:24:34 -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 9E7ED11E80BC for <websec@ietf.org>; Mon, 24 Oct 2011 21:24:34 -0700 (PDT)
Received: by gyh20 with SMTP id 20so117853gyh.31 for <websec@ietf.org>; Mon, 24 Oct 2011 21:24:30 -0700 (PDT)
Received: by 10.151.87.19 with SMTP id p19mr2719183ybl.71.1319516670456; Mon, 24 Oct 2011 21:24:30 -0700 (PDT)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id z15sm16588373anl.15.2011.10.24.21.24.29 (version=SSLv3 cipher=OTHER); Mon, 24 Oct 2011 21:24:29 -0700 (PDT)
Received: by iabn5 with SMTP id n5so136457iab.31 for <websec@ietf.org>; Mon, 24 Oct 2011 21:24:29 -0700 (PDT)
Received: by 10.42.153.6 with SMTP id k6mr42216660icw.30.1319516669136; Mon, 24 Oct 2011 21:24:29 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.231.205.144 with HTTP; Mon, 24 Oct 2011 21:23:59 -0700 (PDT)
In-Reply-To: <4EA6360C.7070700@it.aoyama.ac.jp>
References: <CAJE5ia8n+B10TbjpVYbVieTWEHo3AY_pRm1EToNX_iB1+3UTCw@mail.gmail.com> <4EA6360C.7070700@it.aoyama.ac.jp>
From: Adam Barth <ietf@adambarth.com>
Date: Mon, 24 Oct 2011 21:23:59 -0700
Message-ID: <CAJE5ia8rnkeET5GQhoj7CWbOLha=hp-Ucq6Psw8M1LGvPTMC-w@mail.gmail.com>
To: "Martin J. Dürst" <duerst@it.aoyama.ac.jp>
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 04:24:35 -0000
On Mon, Oct 24, 2011 at 9:07 PM, "Martin J. Dürst" <duerst@it.aoyama.ac.jp> wrote: > On 2011/10/25 11:21, Adam Barth 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? > > They are in the templates. To get the template for a registration, start at > the overview page (http://www.iana.org/assignments/media-types/index.html). > > Then go to the page that lists all the registration for a give top level, > e.g. http://www.iana.org/assignments/media-types/image/index.html for > images. > > Then look at each registration template (click on the link in the left > column, or in the right column if the left one doesn't have a link and the > right one is to an RFC). You may then find a magic number in the > registration template. As an example, for image/jp2, the template is at > http://www.iana.org/assignments/media-types/image/jp2. > > But it looks like earlier templates didn't have a field for a magic number, > and this and the reasons Anne gave make this information helpful for > cross-checking, but not much more. == Images == PNG has a registration template <http://www.iana.org/assignments/media-types/image/png>, but lacks a signature. JPEG doesn't have a template. GIF doesn't have a template. BMP isn't even registered. WEBP isn't even registered. ICO has a registration template <http://www.iana.org/assignments/media-types/image/vnd.microsoft.icon> and has the correct signature. Yay! == Text == HTML lacks a registration template. == Application == PDF doesn't have a template. Postscript doesn't have a template. OGG doesn't have a template. RAR isn't even registered. ZIP has a registration template <http://www.iana.org/assignments/media-types/application/zip>, but lacks a signature. GZIP isn't even registered. RSS isn't even registered. Atom lacks a registration template. == Audio == WAV isn't even registered. == Video == MP4 lacks a registration template. WebM isn't even registered. This does not look like a promising approach. Note: I haven't even looked through all the registrations to see how many have signatures that we shouldn't be using. Adam
- [websec] Issue 17: Registry for magic numbers Adam Barth
- Re: [websec] Issue 17: Registry for magic numbers Anne van Kesteren
- Re: [websec] Issue 17: Registry for magic numbers Adam Barth
- Re: [websec] Issue 17: Registry for magic numbers Martin J. Dürst
- Re: [websec] Issue 17: Registry for magic numbers Tobias Gondrom
- Re: [websec] Issue 17: Registry for magic numbers Adam Barth
- Re: [websec] Issue 17: Registry for magic numbers Tobias Gondrom
- Re: [websec] Issue 17: Registry for magic numbers Adam Barth
- Re: [websec] Issue 17: Registry for magic numbers Larry Masinter
- Re: [websec] Issue 17: Registry for magic numbers Adam Barth
- Re: [websec] Issue 17: Registry for magic numbers Larry Masinter
- Re: [websec] Issue 17: Registry for magic numbers Adam Barth