RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1158950 - file reports "data" instead of "zip archive data" when archive contains unknown version byte value
Summary: file reports "data" instead of "zip archive data" when archive contains unkno...
Keywords:
Status: CLOSED DUPLICATE of bug 1154802
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: file
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-30 14:57 UTC by Alex Sigachev
Modified: 2014-10-31 06:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-31 06:12:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alex Sigachev 2014-10-30 14:57:24 UTC
Description of problem: 
Missing default statement in zip archive checks results in "data" reported instead of "Zip archive data", if tested archive have version byte (at offset 4) value other than listed in magic file.


Version-Release number of selected component (if applicable):
file.x86_64 0:5.04-21.el6

How reproducible:
always

Steps to Reproduce:
1. issue file command on .zip file that contains byte at offset 4 with any value not listed in "magic" file

Actual results: data


Expected results: Zip archive data


Additional info:
The issue causes amavisd to skip archive checks, so it is important on mailservers. It was found because we have received some pieces of zipped malware inside archives with version byte=0x15.

At least version 5.15-4.20.1 of the tool on openSUSE 13.1 don't have this bug.
below is a snippet from the end of magic file section that belongs to zip archives:

-----cut------
# Generic zip archives (Greg Roelofs, c/o zip-bugs.edu)
#   Next line excludes specialized formats:
>(26.s+30)	leshort>!0xcafe
>>26    string          !\x8\0\0\0mimetype	Zip archive data
!:mime<>application/zip
>>>4	byte		0x09		\b, at least v0.9 to extract
>>>4	byte		0x0a		\b, at least v1.0 to extract
>>>4	byte		0x0b		\b, at least v1.1 to extract
>>>4	byte		0x14		\b, at least v2.0 to extract
>>>4	byte		0x2d		\b, at least v3.0 to extract
>>>0x161	string		WINZIP		\b, WinZIP self-extracting
-----cut------
This causes duplication of the "Zip archive data" phrase on normal zip files, but at least amavisd works well.

Comment 2 Jan Kaluža 2014-10-31 06:12:34 UTC
This is duplicate of Bug 1154802.

*** This bug has been marked as a duplicate of bug 1154802 ***


Note You need to log in before you can comment on or make changes to this bug.