Bug 14818 - file new security issues CVE-2014-8116 and CVE-2014-8117
Summary: file new security issues CVE-2014-8116 and CVE-2014-8117
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 4
Hardware: i586 Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL: http://lwn.net/Vulnerabilities/627329/
Whiteboard: has_procedure advisory MGA4-32-OK MGA...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2014-12-16 16:59 CET by David Walser
Modified: 2015-02-18 23:10 CET (History)
3 users (show)

See Also:
Source RPM: file-5.16-1.7.mga4.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2014-12-16 16:59:05 CET
Two security issues fixed in file 5.21 have been announced:
http://openwall.com/lists/oss-security/2014/12/16/2

Patched packages uploaded for Mageia 4 and Cauldron.

Advisory:
========================

Updated file packages fix security vulnerabilities:

Thomas Jarosch of Intra2net AG reported that using the file command on a
specially-crafted ELF binary could lead to a denial of service due to
uncontrolled resource consumption (CVE-2014-8116).

Thomas Jarosch of Intra2net AG reported that using the file command on a
specially-crafted ELF binary could lead to a denial of service due to
uncontrolled recursion (CVE-2014-8117).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-8116
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-8117
http://openwall.com/lists/oss-security/2014/12/16/2
https://bugzilla.redhat.com/show_bug.cgi?id=1171580
https://bugzilla.redhat.com/show_bug.cgi?id=1174606
========================

Updated packages in core/updates_testing:
========================
file-5.16-1.8.mga4
libmagic1-5.16-1.8.mga4
libmagic-devel-5.16-1.8.mga4
libmagic-static-devel-5.16-1.8.mga4
python-magic-5.16-1.8.mga4

from file-5.16-1.8.mga4.src.rpm

Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2014-12-16 17:06:14 CET
Testing procedure:
https://bugs.mageia.org/show_bug.cgi?id=13460#c4

Besides running the file command on ~/* (i.e., the files in your home directory), you should also run it on some ELF files, as that's what's impacted by this update.  Perhaps "file /usr/bin/*" and there will also be a ton of output and it shouldn't crash or hang.

Whiteboard: (none) => has_procedure

Comment 2 David Walser 2014-12-16 17:06:48 CET
I don't know if PHP is affected.  I don't see any commits upstream in PHP for this.

CC: (none) => oe

Comment 3 David Walser 2014-12-16 17:15:04 CET
I've added an additional patch due to this follow-up message:
http://openwall.com/lists/oss-security/2014/12/16/3

We'll see if it receives a CVE too.

Updated packages in core/updates_testing:
========================
file-5.16-1.9.mga4
libmagic1-5.16-1.9.mga4
libmagic-devel-5.16-1.9.mga4
libmagic-static-devel-5.16-1.9.mga4
python-magic-5.16-1.9.mga4

from file-5.16-1.9.mga4.src.rpm
Comment 4 David Walser 2014-12-16 22:35:08 CET
Tested successfully on Mageia 4 i586.  No PoC for the CVEs, but I did test on /usr/bin/* and ~/*.  I also tested on the PoC in Comment 3, but I didn't use valgrind so there's no errors before or after the update.

I'll update the advisory if the Comment 3 one receives a CVE or if Fedora issues an advisory for this.

Whiteboard: has_procedure => has_procedure MGA4-32-OK

Comment 5 David Walser 2014-12-17 03:22:25 CET
And the hits just keep coming.

CVE request for more DoS issues fixed upstream in the ELF parser:
http://openwall.com/lists/oss-security/2014/12/17/1

I'll add those and rebuild the update again once CVEs are assigned.

Whiteboard: has_procedure MGA4-32-OK => has_procedure feedback

Comment 6 David Walser 2014-12-17 17:34:49 CET
I haven't seen anything from cve-assign in quite a while.  Maybe they took December off.  I'll let this one go unless MITRE actually starts responding again.

Also, the newest patches are significant changes and don't look easily rediffable to say the least.  I'll have to see how others handle backporting those changes.

Whiteboard: has_procedure feedback => has_procedure MGA4-32-OK

Comment 7 olivier charles 2014-12-17 20:20:01 CET
Testing on Mageia4x64 real hardware

Current packages :
----------------
file-5.16-1.7.mga4.x86_64
lib64magic1-5.16-1.7.mga4.x86_64
python-magic-5.16-1.7.mga4.x86_64

Following procedure mentionned in comment 1
+ $ file /usr/bin/*

No errors, nor crashes.

PoC found in comment 3 :
$ valgrind -v file file-oob-read.jpg
which returned this error :
ERROR SUMMARY: 1 errors from 1 contexts

Updated testing packages :
------------------------
file-5.16-1.9.mga4.x86_64
lib64magic1-5.16-1.9.mga4.x86_64
python-magic-5.16-1.9.mga4.noarch

Ran same tests : all OK

(including the valgrind test which did not return any error)

Whiteboard: has_procedure MGA4-32-OK => has_procedure MGA4-32-OK MGA4-64-OK
CC: (none) => olchal

Comment 8 claire robinson 2014-12-18 22:28:15 CET
David do you want to update the advisory for the extra patches?
Comment 9 David Walser 2014-12-18 22:40:22 CET
(In reply to claire robinson from comment #8)
> David do you want to update the advisory for the extra patches?

I only added one extra patch in Comment 3, and I don't know enough to say anything about it at this time.
Comment 10 claire robinson 2014-12-18 22:59:11 CET
Thanks, uploaded as comment 0 with srpm from comment 3

Validating.

Could sysadmin please push to 4 updates

Thanks

Whiteboard: has_procedure MGA4-32-OK MGA4-64-OK => has_procedure advisory MGA4-32-OK MGA4-64-OK
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 11 Mageia Robot 2014-12-19 16:07:30 CET
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGASA-2014-0537.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED

David Walser 2014-12-22 20:26:36 CET

URL: (none) => http://lwn.net/Vulnerabilities/627329/

Comment 12 David Walser 2015-02-04 20:05:30 CET
(In reply to David Walser from comment #3)
> I've added an additional patch due to this follow-up message:
> http://openwall.com/lists/oss-security/2014/12/16/3
> 
> We'll see if it receives a CVE too.

CVE request for this issue:
http://openwall.com/lists/oss-security/2015/02/04/12
Comment 13 David Walser 2015-02-05 18:27:07 CET
(In reply to David Walser from comment #12)
> (In reply to David Walser from comment #3)
> > I've added an additional patch due to this follow-up message:
> > http://openwall.com/lists/oss-security/2014/12/16/3
> > 
> > We'll see if it receives a CVE too.
> 
> CVE request for this issue:
> http://openwall.com/lists/oss-security/2015/02/04/12

This is now CVE-2014-9652:
http://openwall.com/lists/oss-security/2015/02/05/12
Comment 14 David Walser 2015-02-18 23:10:46 CET
(In reply to David Walser from comment #13)
> (In reply to David Walser from comment #12)
> > (In reply to David Walser from comment #3)
> > > I've added an additional patch due to this follow-up message:
> > > http://openwall.com/lists/oss-security/2014/12/16/3
> > > 
> > > We'll see if it receives a CVE too.
> > 
> > CVE request for this issue:
> > http://openwall.com/lists/oss-security/2015/02/04/12
> 
> This is now CVE-2014-9652:
> http://openwall.com/lists/oss-security/2015/02/05/12

LWN reference:
http://lwn.net/Vulnerabilities/633839/

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