Bug 866750 (CVE-2014-2270) - VUL-0: CVE-2014-2270: file: crash when parsing some PE executables
Summary: VUL-0: CVE-2014-2270: file: crash when parsing some PE executables
Status: RESOLVED FIXED
Alias: CVE-2014-2270
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Deadline: 2014-04-28
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/96758/
Whiteboard: maint:released:sle10-sp3:56834 maint:...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-04 15:49 UTC by Marcus Meissner
Modified: 2014-11-18 11:00 UTC (History)
5 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2014-03-04 15:49:51 UTC
via oss-sec, no CVE yet

Hi

file can be made to crash when checking some corrupt PE executables,
and so could be used to mount a denial of service for file, or an
application using file/libmagic.

Upstream bugreport: http://bugs.gw.com/view.php?id=313

> Some corrupt PE executables contain invalid offset information in
> their internal directories that libmagic attempts to follow and run
> string searches on. mcopy() does not do bounds checking on the
> indirect offset read from the file and sets up ms->search with invalid
> pointers and lengths.
> 
> The offending line in my case is the msdos magic file is 121:
> >>>>(&0x0f.l+(-4)) search/0x3000 MSCF \b, InstallShield self-extracting archive
> 
> The offset read indirectly was invalid and its bounds were not checked
> in mcopy.

Upstream has fixed this with following commit:

https://github.com/glensc/file/commit/447558595a3650db2886cd2f416ad0beba965801


References:
http://comments.gmane.org/gmane.comp.security.oss.general/12258
Comment 1 Dr. Werner Fink 2014-03-04 15:55:59 UTC
Are you aware that I've submitted a few minutes ago?
Comment 2 Marcus Meissner 2014-03-04 16:12:43 UTC
is this the same bug, looks different?

yes, I am painfully aware :/ but such overlaps happen
Comment 3 Dr. Werner Fink 2014-03-04 16:33:14 UTC
No it is not the samew bug bug this one is the former and I've just reverted the changes from on of the patch I had sumitted.

Beside this I can not work:

 update/SLE-11> isc ci -m .
 Sending    file.changes
 Sending    file.spec
 Sending    0001-PR-313-Aaron-Reffett-Check-properly-for-exceeding-th.patch
 Server returned an error: HTTP Error 403: Forbidden
 no permission to modify package file in project SUSE:SLE-11:Update:Test
 Transmitting file data 

 update/SLE-11> isc branch -M SUSE:SLE-11:Update:Test/file
 Server returned an error: HTTP Error 400: Bad Request
 branch target package already exists: home:WernerFink:branches:SUSE:SLE-11:Update:Test/python-magic.SUSE_SLE-11_Update_Test
Comment 4 Dr. Werner Fink 2014-03-04 16:43:57 UTC
for SLES10-SP4 you'll find SR#33825

... please make the repository for the update for SLES-11 accessible
Comment 5 Dr. Werner Fink 2014-03-04 16:55:54 UTC
The following changes are currently submitted

     
     #33826  for SLE-10-SP4
     #224644 for openSUSE 12.3
     #224639 for openSUSE 13.1

for SLE-11 I can not submit ...

What should be done for

     SUSE:SLE-10-SP3:Update:Test/file
     SUSE:SLE-9-SP3:Update:Teradata:Test/file
Comment 8 Bernhard Wiedemann 2014-03-04 17:00:38 UTC
This is an autogenerated message for OBS integration:
This bug (866750) was mentioned in
https://build.opensuse.org/request/show/224639 13.1 / file
https://build.opensuse.org/request/show/224644 12.3 / file
Comment 9 Dr. Werner Fink 2014-03-04 17:37:54 UTC
OK ... after resolving the link issue on the internal build service


    #33835 for SLE-11
Comment 12 Dr. Werner Fink 2014-03-04 17:47:47 UTC

   #33836  for SLE-9-SP3_Update_Teradata
Comment 14 Swamp Workflow Management 2014-03-04 23:00:19 UTC
bugbot adjusting priority
Comment 15 Dr. Werner Fink 2014-03-05 11:37:42 UTC
New request for SLE-10-SP4 #33910 to mark Bio-Rad patch as enabled
also request for SLE-10-SP3 #33911
Comment 18 Marcus Meissner 2014-03-05 17:13:15 UTC
CVE-2014-2270
Comment 19 Marcus Meissner 2014-03-05 18:36:18 UTC
From: "mancha" <mancha1@hush.com>
Date: Wed, 05 Mar 2014 18:29:22 +0000
To: carnil@debian.org, cve-assign@mitre.org
Cc: oss-security@lists.openwall.com

CVE Assignment Team, et al. -

The initial fix for this problem [1] had an off-by-one flaw
that has since been corrected [2].

I am unsure of the policy regarding the issuance of new CVE 
identifiers associated with incomplete/flawed fixes associated
with previously allocated CVEs. But, in this particular case
file 5.17 shipped with [1] and not [2].

--mancha

[1] https://github.com/file/file/commit/447558595a36
[2] https://github.com/file/file/commit/70c65d2e1841


Werner, can you check if we need these too? 

If you resubmit, please add CVE-2014-2270 to the .changes files too.
Comment 20 Swamp Workflow Management 2014-03-05 23:00:12 UTC
bugbot adjusting priority
Comment 21 Swamp Workflow Management 2014-03-13 16:04:45 UTC
openSUSE-SU-2014:0364-1: An update that fixes two vulnerabilities is now available.

Category: security (moderate)
Bug References: 864589,866750
CVE References: CVE-2014-1943,CVE-2014-2270
Sources used:
openSUSE 13.1 (src):    file-5.15-4.10.1, python-magic-5.15-4.10.1
openSUSE 12.3 (src):    file-5.11-12.6.1, python-magic-5.11-12.6.1
Comment 22 Swamp Workflow Management 2014-03-13 18:04:34 UTC
openSUSE-SU-2014:0367-1: An update that fixes two vulnerabilities is now available.

Category: security (moderate)
Bug References: 864589,866750
CVE References: CVE-2014-1943,CVE-2014-2270
Sources used:
openSUSE 11.4 (src):    file-5.04-16.1, python-magic-5.04-16.1
Comment 23 Dr. Werner Fink 2014-03-17 13:24:31 UTC
(In reply to comment #19)


> [1] https://github.com/file/file/commit/447558595a36

This one is aready part of the fixed version

> [2] https://github.com/file/file/commit/70c65d2e1841

this one is missed.
Comment 24 Dr. Werner Fink 2014-03-17 14:25:55 UTC
#226462
#226464
#34478
#34481
#34480
#34482
Comment 25 Bernhard Wiedemann 2014-03-17 15:00:29 UTC
This is an autogenerated message for OBS integration:
This bug (866750) was mentioned in
https://build.opensuse.org/request/show/226461 Factory / file
https://build.opensuse.org/request/show/226462 13.1 / file
https://build.opensuse.org/request/show/226464 12.3 / file
Comment 27 Bernhard Wiedemann 2014-03-24 13:00:10 UTC
This is an autogenerated message for OBS integration:
This bug (866750) was mentioned in
https://build.opensuse.org/request/show/227307 12.3 / file
Comment 28 Swamp Workflow Management 2014-03-25 10:04:24 UTC
openSUSE-SU-2014:0435-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 866750
CVE References: CVE-2014-2270
Sources used:
openSUSE 13.1 (src):    file-5.15-4.20.1, python-magic-5.15-4.20.1
openSUSE 12.3 (src):    file-5.11-12.16.1, python-magic-5.11-12.16.1
Comment 29 SMASH SMASH 2014-03-31 12:35:15 UTC
Affected packages:

SLE-11-SP3: file
SLE-10-SP3-TERADATA: file
Comment 30 Swamp Workflow Management 2014-03-31 12:35:44 UTC
The SWAMPID for this issue is 56831.
This issue was rated as low.
Please submit fixed packages until 2014-04-28.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 31 Swamp Workflow Management 2014-04-08 19:06:00 UTC
openSUSE-SU-2014:0495-1: An update that contains security fixes can now be installed.

Category: security (moderate)
Bug References: 866750
CVE References: 
Sources used:
openSUSE 11.4 (src):    file-5.04-20.1, python-magic-5.04-20.1
Comment 32 Swamp Workflow Management 2014-05-16 15:04:45 UTC
Update released for: file, file-debuginfo, file-debugsource, file-devel
Products:
SLE-DEBUGINFO 11-SP1-TERADATA (x86_64)
SLE-SERVER 11-SP1-TERADATA (x86_64)
Comment 33 Swamp Workflow Management 2014-05-16 15:05:09 UTC
Update released for: file
Products:
SUSE-CORE 9-SP3-TERADATA (x86_64)
Comment 34 Swamp Workflow Management 2014-05-16 15:05:29 UTC
Update released for: file, file-debuginfo, file-devel
Products:
SLE-DEBUGINFO 10-SP3-TERADATA (x86_64)
SLE-SERVER 10-SP3-TERADATA (x86_64)
Comment 35 Swamp Workflow Management 2014-05-16 19:50:45 UTC
Update released for: file, file-32bit, file-64bit, file-debuginfo, file-debuginfo-32bit, file-debuginfo-64bit, file-debuginfo-x86, file-debugsource, file-devel, file-x86, python-magic, python-magic-debuginfo, python-magic-debugsource
Products:
SLE-DEBUGINFO 11-SP3 (i386, ia64, ppc64, s390x, x86_64)
SLE-DESKTOP 11-SP3 (i386, x86_64)
SLE-SDK 11-SP3 (i386, ia64, ppc64, s390x, x86_64)
SLE-SERVER 11-SP3 (i386, ia64, ppc64, s390x, x86_64)
SLES4VMWARE 11-SP3 (i386, x86_64)
Comment 36 Sebastian Krahmer 2014-05-19 07:51:17 UTC
released