Bug 1180175 (CVE-2015-4467, CVE-2015-4472)

Summary: CVE-2015-4467 CVE-2015-4472 libmspack: denial of service while processing crafted CHM file (floating point exception)
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: carnil, dan, jrusnack, pertusus
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-11 14:51:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1180178, 1180179    
Bug Blocks:    
Attachments:
Description Flags
fix-division-by-zero.diff none

Description Vasyl Kaigorodov 2015-01-08 14:54:31 UTC
It was reported [1] that libmspack crashes with SIGFPE on a crafted CHM file.

$ gpg -d < sigfpe.chm.asc > sigfpe.chm
$ test/chmd_md5 sigfpe.chm
*** sigfpe.chm
d41d8cd98f00b204e9800998ecf8427e /#ITBITS
Floating point exception

Backtrace:
#0  0x5655d37b in __divdi3 ()
#1  0x56559ebb in chmd_init_decomp (file=0x56563378, self=0x56562008) at mspack/chmd.c:1132
#2  chmd_extract (base=0x56562008, file=0x56563378, filename=0x0) at mspack/chmd.c:996
#3  0x56555c40 in main (argc=2, argv=0xffffd888) at test/chmd_md5.c:44

This crashes ClamAV scanning such a file.

Proposed patch is attached.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774725

Comment 1 Vasyl Kaigorodov 2015-01-08 14:55:20 UTC
Created attachment 977814 [details]
fix-division-by-zero.diff

Comment 2 Vasyl Kaigorodov 2015-01-08 14:59:28 UTC
Created libmspack tracking bugs for this issue:

Affects: fedora-all [bug 1180178]
Affects: epel-all [bug 1180179]

Comment 3 Vasyl Kaigorodov 2015-01-19 13:47:46 UTC
Another (similar) issue was reported here:
 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775687

Proposed patch can be found in the Debian tracker.

Comment 4 Fedora Update System 2015-03-13 17:00:36 UTC
libmspack-0.5-0.1.alpha.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2015-03-13 17:02:12 UTC
libmspack-0.5-0.1.alpha.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-03-13 17:14:35 UTC
libmspack-0.5-0.1.alpha.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-03-25 20:04:25 UTC
libmspack-0.5-0.1.alpha.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-03-25 20:04:57 UTC
libmspack-0.5-0.1.alpha.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Vasyl Kaigorodov 2015-06-11 14:51:41 UTC
CVE assigned: http://seclists.org/oss-sec/2015/q2/691