Bug 917150 (CVE-2014-9652) - VUL-1: CVE-2014-9652: php5,php53: out of bounds read in mconvert()
Summary: VUL-1: CVE-2014-9652: php5,php53: out of bounds read in mconvert()
Status: RESOLVED FIXED
Alias: CVE-2014-9652
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Minor
Target Milestone: ---
Deadline: 2015-03-03
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/113576/
Whiteboard: maint:released:sle11-sp3:60827
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-10 16:34 UTC by Johannes Segitz
Modified: 2016-06-21 11:12 UTC (History)
1 user (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 Johannes Segitz 2015-02-10 16:34:23 UTC
rh#1188599

Out of bounds memory read was reported in file utility, which also affects PHP fileinfo module.

PHP upstream fix:
https://github.com/php/php-src/commit/ede59c8feb4b80e1b94e4abdaa0711051e2912ab

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1188599
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-9652
http://people.canonical.com/~ubuntu-security/cve/2014/CVE-2014-9652.html
Comment 1 Swamp Workflow Management 2015-02-10 23:00:42 UTC
bugbot adjusting priority
Comment 2 Swamp Workflow Management 2015-02-24 13:21:21 UTC
An update workflow for this issue was started.
This issue was rated as important.
Please submit fixed packages until 2015-03-03.
When done, reassign the bug to security-team@suse.de.
https://swamp.suse.de/webswamp/wf/60773
Comment 3 Petr Gajdos 2015-02-25 14:28:40 UTC
upstream bug: http://bugs.gw.com/view.php?id=398
php bug:      https://bugs.php.net/bug.php?id=68735
Comment 5 Petr Gajdos 2015-02-26 09:53:24 UTC
Can be tested like this:

$ export USE_ZEND_ALLOC=0
$ valgrind php test.php
[...]
==1047== Invalid read of size 1
==1047==    at 0x6F95EC8: mconvert (softmagic.c:930)
==1047==    by 0x6F95EC8: mget (softmagic.c:1801)
==1047==    by 0x6F94F87: match (softmagic.c:257)
==1047==    by 0x6F9542A: file_softmagic (softmagic.c:93)
==1047==    by 0x6F914EA: file_buffer (funcs.c:236)
==1047==    by 0x6F91D2F: file_or_stream (magic.c:409)
==1047==    by 0x6F88779: _php_finfo_get_type.isra.0 (fileinfo.c:542)
==1047==    by 0x79369F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==1047==    by 0x72A3A7: execute_ex (zend_vm_execute.h:363)
==1047==    by 0x6F151F: zend_execute_scripts (zend.c:1344)
==1047==    by 0x68F084: php_execute_script (main.c:2584)
==1047==    by 0x7952EE: do_cli (php_cli.c:994)
==1047==    by 0x5746CF: main (php_cli.c:1378)
==1047==  Address 0x6edf0d0 is 0 bytes after a block of size 176 alloc'd
==1047==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1047==    by 0x6C9CC7: _ecalloc (zend_alloc.c:2610)
==1047==    by 0x6F89756: file_ms_alloc (apprentice.c:469)
==1047==    by 0x6F87BFD: zif_finfo_open (fileinfo.c:338)
==1047==    by 0x79369F: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==1047==    by 0x72A3A7: execute_ex (zend_vm_execute.h:363)
==1047==    by 0x6F151F: zend_execute_scripts (zend.c:1344)
==1047==    by 0x68F084: php_execute_script (main.c:2584)
==1047==    by 0x7952EE: do_cli (php_cli.c:994)
==1047==    by 0x5746CF: main (php_cli.c:1378)
[...]

where test is formed from
https://github.com/php/php-src/blob/ede59c8feb4b80e1b94e4abdaa0711051e2912ab/ext/fileinfo/tests/bug68735.phpt
and
https://github.com/php/php-src/blob/ede59c8feb4b80e1b94e4abdaa0711051e2912ab/ext/fileinfo/tests/bug68735.jpg
Comment 7 Petr Gajdos 2015-02-26 10:19:56 UTC
Packages submitted:

openSUSE: mr#287863
12:       mr#52276
11sp3:    sr#52278
Comment 9 Swamp Workflow Management 2015-03-04 15:05:08 UTC
SUSE-SU-2015:0424-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 917150,918768
CVE References: CVE-2014-9652,CVE-2015-0273
Sources used:
SUSE Linux Enterprise Software Development Kit 12 (src):    php5-5.5.14-15.1
SUSE Linux Enterprise Module for Web Scripting 12 (src):    php5-5.5.14-15.1
Comment 10 Marcus Meissner 2015-03-05 09:38:50 UTC
released
Comment 11 Swamp Workflow Management 2015-03-05 20:05:04 UTC
SUSE-SU-2015:0436-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 917150,918768
CVE References: CVE-2013-6501,CVE-2014-9652
Sources used:
SUSE Linux Enterprise Software Development Kit 11 SP3 (src):    php53-5.3.17-0.35.2
SUSE Linux Enterprise Server 11 SP3 for VMware (src):    php53-5.3.17-0.35.2
SUSE Linux Enterprise Server 11 SP3 (src):    php53-5.3.17-0.35.2
Comment 12 Swamp Workflow Management 2015-03-06 10:04:59 UTC
openSUSE-SU-2015:0440-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 917150,918768
CVE References: CVE-2014-9652,CVE-2015-0273
Sources used:
openSUSE 13.2 (src):    php5-5.6.1-12.1
openSUSE 13.1 (src):    php5-5.4.20-42.1
Comment 13 Swamp Workflow Management 2016-06-21 11:12:05 UTC
SUSE-SU-2016:1638-1: An update that fixes 85 vulnerabilities is now available.

Category: security (important)
Bug References: 884986,884987,884989,884990,884991,884992,885961,886059,886060,893849,893853,902357,902360,902368,910659,914690,917150,918768,919080,921950,922451,922452,923945,924972,925109,928506,928511,931421,931769,931772,931776,933227,935074,935224,935226,935227,935229,935232,935234,935274,935275,938719,938721,942291,942296,945412,945428,949961,968284,969821,971611,971612,971912,973351,973792,976996,976997,977003,977005,977991,977994,978827,978828,978829,978830,980366,980373,980375,981050,982010,982011,982012,982013,982162
CVE References: CVE-2004-1019,CVE-2006-7243,CVE-2014-0207,CVE-2014-3478,CVE-2014-3479,CVE-2014-3480,CVE-2014-3487,CVE-2014-3515,CVE-2014-3597,CVE-2014-3668,CVE-2014-3669,CVE-2014-3670,CVE-2014-4049,CVE-2014-4670,CVE-2014-4698,CVE-2014-4721,CVE-2014-5459,CVE-2014-8142,CVE-2014-9652,CVE-2014-9705,CVE-2014-9709,CVE-2014-9767,CVE-2015-0231,CVE-2015-0232,CVE-2015-0273,CVE-2015-1352,CVE-2015-2301,CVE-2015-2305,CVE-2015-2783,CVE-2015-2787,CVE-2015-3152,CVE-2015-3329,CVE-2015-3411,CVE-2015-3412,CVE-2015-4021,CVE-2015-4022,CVE-2015-4024,CVE-2015-4026,CVE-2015-4116,CVE-2015-4148,CVE-2015-4598,CVE-2015-4599,CVE-2015-4600,CVE-2015-4601,CVE-2015-4602,CVE-2015-4603,CVE-2015-4643,CVE-2015-4644,CVE-2015-5161,CVE-2015-5589,CVE-2015-5590,CVE-2015-6831,CVE-2015-6833,CVE-2015-6836,CVE-2015-6837,CVE-2015-6838,CVE-2015-7803,CVE-2015-8835,CVE-2015-8838,CVE-2015-8866,CVE-2015-8867,CVE-2015-8873,CVE-2015-8874,CVE-2015-8879,CVE-2016-2554,CVE-2016-3141,CVE-2016-3142,CVE-2016-3185,CVE-2016-4070,CVE-2016-4073,CVE-2016-4342,CVE-2016-4346,CVE-2016-4537,CVE-2016-4538,CVE-2016-4539,CVE-2016-4540,CVE-2016-4541,CVE-2016-4542,CVE-2016-4543,CVE-2016-4544,CVE-2016-5093,CVE-2016-5094,CVE-2016-5095,CVE-2016-5096,CVE-2016-5114
Sources used:
SUSE Linux Enterprise Server 11-SP2-LTSS (src):    php53-5.3.17-47.1