Debian Bug report logs - #601447
file: Incorrect mime info for windows executables

version graph

Package: file; Maintainer for file is Christoph Biedl <debian.axhn@manchmal.in-ulm.de>; Source for file is src:file (PTS, buildd, popcon).

Reported by: Julien Pinon <jpinon@olfeo.com>

Date: Tue, 26 Oct 2010 08:57:06 UTC

Severity: normal

Tags: patch

Found in version file/5.04-5

Fixed in version file/5.12-1

Done: Daniel Baumann <daniel.baumann@progress-technologies.net>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Daniel Baumann <daniel@lists.debian-maintainers.org>:
Bug#601447; Package file. (Tue, 26 Oct 2010 08:57:09 GMT) (full text, mbox, link).


Acknowledgement sent to Julien Pinon <jpinon@olfeo.com>:
New Bug report received and forwarded. Copy sent to Daniel Baumann <daniel@lists.debian-maintainers.org>. (Tue, 26 Oct 2010 08:57:09 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Julien Pinon <jpinon@olfeo.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: file: Incorrect mime info for windows executables
Date: Tue, 26 Oct 2010 10:47:54 +0200
Package: file
Version: 5.04-5
Severity: normal
Tags: patch


As reported upstream [1], Windows executables have bad mime type
recognition.

The patch provided in [2] corrects the problem, so I adapted it to
apply as patch 247 in debian package.

[1] : http://mx.gw.com/pipermail/file/2010/000642.html
[2] : http://mx.gw.com/pipermail/file/2010/000648.html

-------------------------------------------------------------------------------
--- file.orig/magic/Magdir/msdos	2010-10-26 10:12:04.000000000 +0200
+++ file/magic/Magdir/msdos	2010-10-26 10:24:28.000000000 +0200
@@ -55,24 +55,41 @@
 0	string	MZ
 !:mime	application/x-dosexec
 >0x18  leshort <0x40 MS-DOS executable
+!:mime	application/x-dosexec
 >0 string MZ\0\0\0\0\0\0\0\0\0\0PE\0\0 \b, PE for MS Windows
+!:mime	application/x-dosexec
 >>&18	leshort&0x2000	>0	(DLL)
+!:mime	application/x-dosexec
 >>&88	leshort		0	(unknown subsystem)
+!:mime	application/x-dosexec
 >>&88	leshort		1	(native)
+!:mime	application/x-dosexec
 >>&88	leshort		2	(GUI)
+!:mime	application/x-dosexec
 >>&88	leshort		3	(console)
+!:mime	application/x-dosexec
 >>&88	leshort		7	(POSIX)
+!:mime	application/x-dosexec
 >>&0	leshort		0x0	unknown processor
+!:mime	application/x-dosexec
 >>&0	leshort		0x14c	Intel 80386
+!:mime	application/x-dosexec
 >>&0	leshort		0x166	MIPS R4000
+!:mime	application/x-dosexec
 >>&0	leshort		0x184	Alpha
+!:mime	application/x-dosexec
 >>&0	leshort		0x268	Motorola 68000
+!:mime	application/x-dosexec
 >>&0	leshort		0x1f0	PowerPC
+!:mime	application/x-dosexec
 >>&0	leshort		0x290	PA-RISC
+!:mime	application/x-dosexec
 >>&18	leshort&0x0100	>0	32-bit
+!:mime	application/x-dosexec
 >>&18	leshort&0x1000	>0	system file
 >>&228	lelong		>0	\b, Mono/.Net assembly
 >>&0xf4 search/0x140 \x0\x40\x1\x0
+!:mime	application/x-dosexec
 >>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
 >30		string	Copyright\ 1989-1990\ PKWARE\ Inc.	Self-extracting PKZIP archive
 !:mime	application/zip
@@ -83,17 +100,23 @@
 >0x18  leshort >0x3f
 >>(0x3c.l) string PE\0\0 PE
 >>>(0x3c.l+25) byte		1 \b32 executable
+!:mime	application/x-dosexec
 >>>(0x3c.l+25) byte		2 \b32+ executable
+!:mime	application/x-dosexec
 # hooray, there's a DOS extender using the PE format, with a valid PE
 # executable inside (which just prints a message and exits if run in win)
 >>>(0x3c.l+92)	leshort		<10
 >>>>(8.s*16) string 32STUB for MS-DOS, 32rtm DOS extender
 >>>>(8.s*16) string !32STUB for MS Windows
 >>>>>(0x3c.l+22)	leshort&0x2000	>0	(DLL)
+!:mime	application/x-dosexec
 >>>>>(0x3c.l+92)	leshort		0	(unknown subsystem)
 >>>>>(0x3c.l+92)	leshort		1	(native)
+!:mime	application/x-dosexec
 >>>>>(0x3c.l+92)	leshort		2	(GUI)
+!:mime	application/x-dosexec
 >>>>>(0x3c.l+92)	leshort		3	(console)
+!:mime	application/x-dosexec
 >>>>>(0x3c.l+92)	leshort		7	(POSIX)
 >>>(0x3c.l+92)	leshort		10	(EFI application)
 >>>(0x3c.l+92)	leshort		11	(EFI boot service driver)
@@ -101,6 +124,7 @@
 >>>(0x3c.l+92)	leshort		13	(XBOX)
 >>>(0x3c.l+4)	leshort		0x0	unknown processor
 >>>(0x3c.l+4)	leshort		0x14c	Intel 80386
+!:mime	application/x-dosexec
 >>>(0x3c.l+4)	leshort		0x166	MIPS R4000
 >>>(0x3c.l+4)	leshort		0x184	Alpha
 >>>(0x3c.l+4)	leshort		0x268	Motorola 68000
@@ -108,6 +132,7 @@
 >>>(0x3c.l+4)	leshort		0x290	PA-RISC
 >>>(0x3c.l+4)	leshort		0x200	Intel Itanium
 >>>(0x3c.l+22)	leshort&0x0100	>0	32-bit
+!:mime	application/x-dosexec
 >>>(0x3c.l+22)	leshort&0x1000	>0	system file
 >>>(0x3c.l+232) lelong	>0	Mono/.Net assembly
 
@@ -139,6 +164,7 @@
 >>>>0x30		string		Inno \b, InnoSetup self-extracting archive
 
 >>(0x3c.l) string !PE\0\0 MS-DOS executable
+!:mime	application/x-dosexec
 
 >>(0x3c.l)		string		NE \b, NE
 >>>(0x3c.l+0x36)	byte		0 (unknown OS)
@@ -173,6 +199,7 @@
 >>(0x3c.l)		string		W3 \b, W3 for MS Windows
 
 >>(0x3c.l)		string		LE\0\0 \b, LE executable
+!:mime	application/x-dosexec
 >>>(0x3c.l+0x0a)	leshort		1
 # some DOS extenders use LE files with OS/2 header
 >>>>0x240		search/0x100	DOS/4G for MS-DOS, DOS4GW DOS extender
@@ -190,8 +217,11 @@
 #>>>>(0x3c.l+0x1c)	lelong		>0x10000 for OS/2
 # fails with DOS-Extenders.
 >>>(0x3c.l+0x0a)	leshort		2 for MS Windows
+!:mime	application/x-dosexec
 >>>(0x3c.l+0x0a)	leshort		3 for DOS
+!:mime	application/x-dosexec
 >>>(0x3c.l+0x0a)	leshort		4 for MS Windows (VxD)
+!:mime	application/x-dosexec
 >>>(&0x7c.l+0x26)	string		UPX \b, UPX compressed
 >>>&(&0x54.l-3)		string		UNACE \b, ACE self-extracting archive
 
@@ -207,6 +237,7 @@
 >>>>&(2.s-514)	string	!LE
 >>>>>&-2	string	!BW \b, MZ for MS-DOS
 >>>>&(2.s-514)	string	LE \b, LE
+!:mime	application/x-dosexec
 >>>>>0x240	search/0x100	DOS/4G for MS-DOS, DOS4GW DOS extender
 # educated guess since indirection is still not capable enough for complex offset
 # calculations (next embedded executable would be at &(&2*512+&0-2)
@@ -259,7 +290,9 @@
 
 # skip to the end of the exe
 >(4.s*512)	long	x 
+!:mime	application/x-dosexec
 >>&(2.s-517)	byte	x 
+!:mime	application/x-dosexec
 >>>&0	string		PK\3\4 \b, ZIP self-extracting archive
 >>>&0	string		Rar! \b, RAR self-extracting archive
 >>>&0	string		=!\x11 \b, AIN 2.x self-extracting archive
-------------------------------------------------------------------------------

-- System Information:
Debian Release: 5.0.6
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-openvz-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages file depends on:
ii  libc6                  2.7-18lenny6      GNU C Library: Shared libraries
ii  libmagic1              5.04-5            File type determination library us
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

file recommends no packages.

file suggests no packages.

-- no debconf information




Marked as fixed in versions 5.12. Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Wed, 13 Mar 2013 15:39:08 GMT) (full text, mbox, link).


Marked Bug as done Request was from Daniel Baumann <daniel.baumann@progress-technologies.net> to control@bugs.debian.org. (Wed, 13 Mar 2013 15:39:08 GMT) (full text, mbox, link).


Notification sent to Julien Pinon <jpinon@olfeo.com>:
Bug acknowledged by developer. (Wed, 13 Mar 2013 15:39:09 GMT) (full text, mbox, link).


No longer marked as fixed in versions 5.12. Request was from Andreas Beckmann <anbe@debian.org> to control@bugs.debian.org. (Fri, 01 Nov 2013 01:22:07 GMT) (full text, mbox, link).


Marked as fixed in versions file/5.12-1. Request was from Andreas Beckmann <anbe@debian.org> to control@bugs.debian.org. (Fri, 01 Nov 2013 01:22:07 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 29 Nov 2013 07:37:11 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Oct 11 00:24:36 2017; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.