Bug 1132837 (CVE-2019-11035) - VUL-1: CVE-2019-11035: php5,php72,php7,php53: Heap-buffer-overflow in exif_iif_add_value in EXIF
Summary: VUL-1: CVE-2019-11035: php5,php72,php7,php53: Heap-buffer-overflow in exif_ii...
Status: RESOLVED FIXED
Alias: CVE-2019-11035
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Minor
Target Milestone: ---
Deadline: 2019-06-06
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/229736/
Whiteboard: maint:released:sle10-sp3:64287
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-18 08:47 UTC by Alexandros Toptsoglou
Modified: 2023-10-26 10:35 UTC (History)
2 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 Alexandros Toptsoglou 2019-04-18 08:47:45 UTC
CVE-2019-11035

[Heap-buffer-overflow in exif_iif_add_value in EXIF]

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-11035
http://people.canonical.com/~ubuntu-security/cve/2019/CVE-2019-11035.html
https://bugs.php.net/bug.php?id=77831
Comment 1 Alexandros Toptsoglou 2019-04-18 11:51:29 UTC
After a code review of the upstream fix [1] it seems that all codestreams are affected. 
Thus: 
php5 for SLE10 and and SLE11 is affected
php53 for SLE11-SP2/SP3 is affected
php7 for SLE12 and SLE 15 is affected 
php72 for SLE15 is affected. 

[1] https://bugs.php.net/bug.php?id=77831
Comment 2 Petr Gajdos 2019-04-29 08:57:28 UTC
Testcase is not publicly available.
Comment 3 Petr Gajdos 2019-04-29 09:16:03 UTC
Actually, it is in upstream commit.
Comment 4 Petr Gajdos 2019-04-29 12:04:55 UTC
BEFORE

7.2.5, 7.0.7, 5.3.17, 5.2.14

$ USE_ZEND_ALLOC=0 valgrind  -q php test.php
PHP Warning:  exif_read_data(bug77831.tiff): Process tag(x2020=UndefinedTa): Illegal format code 0x2020, suppose BYTE in /132837/test.php on line 2
==19210== Invalid read of size 8
==19210==    at 0x6F631FB: exif_iif_add_value (exif.c:2184)
==19210==    by 0x6F631FB: exif_iif_add_tag (exif.c:2199)
==19210==    by 0x6F631FB: exif_process_IFD_TAG (exif.c:3547)
==19210==    by 0x6F631FB: exif_process_IFD_in_JPEG (exif.c:3580)
==19210==    by 0x6F6760D: exif_process_TIFF_in_JPEG (exif.c:3669)
==19210==    by 0x6F6760D: exif_process_APP1 (exif.c:3694)
==19210==    by 0x6F6760D: exif_scan_JPEG_header (exif.c:3839)
==19210==    by 0x6F6760D: exif_scan_FILE_header (exif.c:4232)
==19210==    by 0x6F6760D: exif_read_from_impl (exif.c:4373)
==19210==    by 0x6F6760D: exif_read_from_stream.constprop.17 (exif.c:4390)
==19210==    by 0x6F67A0C: exif_read_from_file (exif.c:4417)
==19210==    by 0x6F67A0C: zif_exif_read_data (exif.c:4492)
==19210==    by 0x81B569: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617)
==19210==    by 0x81B569: execute_ex (zend_vm_execute.h:59734)
==19210==    by 0x826223: zend_execute (zend_vm_execute.h:63760)
==19210==    by 0x75E3AF: zend_execute_scripts (zend.c:1496)
==19210==    by 0x6F06DF: php_execute_script (main.c:2590)
==19210==    by 0x828D85: do_cli (php_cli.c:1011)
==19210==    by 0x58DB7D: main (php_cli.c:1404)
==19210==  Address 0x6dd473a is 42 bytes inside a block of size 47 alloc'd
==19210==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==19210==    by 0x72B138: __zend_malloc (zend_alloc.c:2829)
==19210==    by 0x6F670A2: exif_file_sections_add (exif.c:2014)
==19210==    by 0x6F670A2: exif_scan_JPEG_header (exif.c:3793)
==19210==    by 0x6F670A2: exif_scan_FILE_header (exif.c:4232)
==19210==    by 0x6F670A2: exif_read_from_impl (exif.c:4373)
==19210==    by 0x6F670A2: exif_read_from_stream.constprop.17 (exif.c:4390)
==19210==    by 0x6F67A0C: exif_read_from_file (exif.c:4417)
==19210==    by 0x6F67A0C: zif_exif_read_data (exif.c:4492)
==19210==    by 0x81B569: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617)
==19210==    by 0x81B569: execute_ex (zend_vm_execute.h:59734)
==19210==    by 0x826223: zend_execute (zend_vm_execute.h:63760)
==19210==    by 0x75E3AF: zend_execute_scripts (zend.c:1496)
==19210==    by 0x6F06DF: php_execute_script (main.c:2590)
==19210==    by 0x828D85: do_cli (php_cli.c:1011)
==19210==    by 0x58DB7D: main (php_cli.c:1404)
==19210== 
PHP Warning:  exif_read_data(bug77831.tiff): Illegal IFD size in /132837/test.php on line 2
PHP Warning:  exif_read_data(bug77831.tiff): File structure corrupted in /132837/test.php on line 2
PHP Warning:  exif_read_data(bug77831.tiff): Invalid JPEG file in /132837/test.php on line 2
bool(false)

$

PATCH

http://git.php.net/?p=php-src.git;a=commit;h=887a7b571407f7a49a5e7cf1e612d21ef83fedb4
http://git.php.net/?p=php-src.git;a=commit;h=01a4de5c5821f67daeff487ef9b3047ce7b47c4c
http://git.php.net/?p=php-src.git;a=commit;h=dc1cd3daf2521b352b0c9fa6ade7e49a8cc63130

AFTER

7.2.5, 7.0.7, 5.3.17 and 5.2.14

$ USE_ZEND_ALLOC=0 valgrind  -q php test.php
PHP Warning:  exif_read_data(bug77831.tiff): Process tag(x2020=UndefinedTa): Illegal format code 0x2020, suppose BYTE in /132837/test.php on line 2
PHP Warning:  exif_read_data(bug77831.tiff): Illegal IFD size in /132837/test.php on line 2
PHP Warning:  exif_read_data(bug77831.tiff): File structure corrupted in /132837/test.php on line 2
PHP Warning:  exif_read_data(bug77831.tiff): Invalid JPEG file in /132837/test.php on line 2
bool(false)

$
Comment 5 Petr Gajdos 2019-04-29 12:23:28 UTC
Submitted for: 15/php7, 12/php72, 12/php7, 12/php5, 11sp3/php53, 11/php5, 10sp3/php5.
Comment 6 Petr Gajdos 2019-04-29 12:24:48 UTC
I believe all fixed.
Comment 9 Petr Gajdos 2019-04-30 08:48:08 UTC
Fixed also in devel:languages:php:php56.
Comment 12 Swamp Workflow Management 2019-05-23 11:21:12 UTC
An update workflow for this issue was started.
This issue was rated as moderate.
Please submit fixed packages until 2019-06-06.
When done, reassign the bug to security-team@suse.de.
https://swamp.suse.de/webswamp/wf/64286
Comment 13 Swamp Workflow Management 2019-05-23 19:11:34 UTC
SUSE-SU-2019:1325-1: An update that fixes 8 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1128883,1128886,1128887,1128889,1128892,1132837,1132838,1134322
CVE References: CVE-2019-11034,CVE-2019-11035,CVE-2019-11036,CVE-2019-9637,CVE-2019-9638,CVE-2019-9639,CVE-2019-9640,CVE-2019-9675
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    php5-5.5.14-109.58.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    php5-5.5.14-109.58.1
SUSE Linux Enterprise Module for Web Scripting 12 (src):    php5-5.5.14-109.58.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 14 Swamp Workflow Management 2019-05-27 22:14:46 UTC
SUSE-SU-2019:1360-1: An update that solves three vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 1132837,1132838,1133714,1134322
CVE References: CVE-2019-11034,CVE-2019-11035,CVE-2019-11036
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    php72-7.2.5-1.17.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    php72-7.2.5-1.17.1
SUSE Linux Enterprise Module for Web Scripting 12 (src):    php72-7.2.5-1.17.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 15 Swamp Workflow Management 2019-05-28 13:12:07 UTC
SUSE-SU-2019:1365-1: An update that fixes three vulnerabilities is now available.

Category: security (moderate)
Bug References: 1132837,1132838,1134322
CVE References: CVE-2019-11034,CVE-2019-11035,CVE-2019-11036
Sources used:
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    php7-7.0.7-50.75.1
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    php7-7.0.7-50.75.1
SUSE Linux Enterprise Module for Web Scripting 12 (src):    php7-7.0.7-50.75.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 16 Swamp Workflow Management 2019-06-03 13:10:58 UTC
openSUSE-SU-2019:1501-1: An update that fixes three vulnerabilities is now available.

Category: security (moderate)
Bug References: 1132837,1132838,1134322
CVE References: CVE-2019-11034,CVE-2019-11035,CVE-2019-11036
Sources used:
openSUSE Leap 42.3 (src):    php7-7.0.7-61.1
Comment 17 Swamp Workflow Management 2019-06-03 13:16:32 UTC
openSUSE-SU-2019:1503-1: An update that fixes 8 vulnerabilities is now available.

Category: security (moderate)
Bug References: 1128883,1128886,1128887,1128889,1128892,1132837,1132838,1134322
CVE References: CVE-2019-11034,CVE-2019-11035,CVE-2019-11036,CVE-2019-9637,CVE-2019-9638,CVE-2019-9639,CVE-2019-9640,CVE-2019-9675
Sources used:
openSUSE Leap 42.3 (src):    php5-5.5.14-118.1
Comment 18 Swamp Workflow Management 2019-06-11 22:13:09 UTC
SUSE-SU-2019:1461-1: An update that solves 16 vulnerabilities and has two fixes is now available.

Category: security (moderate)
Bug References: 1118832,1119396,1126711,1126713,1126821,1126823,1126827,1127122,1128722,1128883,1128886,1128887,1128889,1128892,1129032,1132837,1132838,1134322
CVE References: CVE-2018-19935,CVE-2018-20783,CVE-2019-11034,CVE-2019-11035,CVE-2019-11036,CVE-2019-9020,CVE-2019-9021,CVE-2019-9022,CVE-2019-9023,CVE-2019-9024,CVE-2019-9637,CVE-2019-9638,CVE-2019-9639,CVE-2019-9640,CVE-2019-9641,CVE-2019-9675
Sources used:
SUSE Linux Enterprise Module for Web Scripting 15 (src):    php7-7.2.5-4.32.1
SUSE Linux Enterprise Module for Packagehub Subpackages 15 (src):    php7-7.2.5-4.32.1
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    php7-7.2.5-4.32.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 19 Swamp Workflow Management 2019-06-18 16:39:14 UTC
openSUSE-SU-2019:1572-1: An update that solves 16 vulnerabilities and has two fixes is now available.

Category: security (moderate)
Bug References: 1118832,1119396,1126711,1126713,1126821,1126823,1126827,1127122,1128722,1128883,1128886,1128887,1128889,1128892,1129032,1132837,1132838,1134322
CVE References: CVE-2018-19935,CVE-2018-20783,CVE-2019-11034,CVE-2019-11035,CVE-2019-11036,CVE-2019-9020,CVE-2019-9021,CVE-2019-9022,CVE-2019-9023,CVE-2019-9024,CVE-2019-9637,CVE-2019-9638,CVE-2019-9639,CVE-2019-9640,CVE-2019-9641,CVE-2019-9675
Sources used:
openSUSE Leap 15.1 (src):    php7-7.2.5-lp151.6.3.1
Comment 20 Swamp Workflow Management 2019-06-18 16:44:15 UTC
openSUSE-SU-2019:1573-1: An update that solves 16 vulnerabilities and has two fixes is now available.

Category: security (moderate)
Bug References: 1118832,1119396,1126711,1126713,1126821,1126823,1126827,1127122,1128722,1128883,1128886,1128887,1128889,1128892,1129032,1132837,1132838,1134322
CVE References: CVE-2018-19935,CVE-2018-20783,CVE-2019-11034,CVE-2019-11035,CVE-2019-11036,CVE-2019-9020,CVE-2019-9021,CVE-2019-9022,CVE-2019-9023,CVE-2019-9024,CVE-2019-9637,CVE-2019-9638,CVE-2019-9639,CVE-2019-9640,CVE-2019-9641,CVE-2019-9675
Sources used:
openSUSE Leap 15.0 (src):    php7-7.2.5-lp150.2.19.1
Comment 21 Marcus Meissner 2019-09-03 13:31:55 UTC
released
Comment 24 OBSbugzilla Bot 2020-05-12 08:01:38 UTC
This is an autogenerated message for OBS integration:
This bug (1132837) was mentioned in
https://build.opensuse.org/request/show/802846 Factory / php7
Comment 25 OBSbugzilla Bot 2020-05-12 14:01:24 UTC
This is an autogenerated message for OBS integration:
This bug (1132837) was mentioned in
https://build.opensuse.org/request/show/802978 Factory / php7
Comment 26 OBSbugzilla Bot 2020-05-13 08:21:19 UTC
This is an autogenerated message for OBS integration:
This bug (1132837) was mentioned in
https://build.opensuse.org/request/show/804946 Factory / php7
Comment 28 OBSbugzilla Bot 2020-05-13 13:30:47 UTC
This is an autogenerated message for OBS integration:
This bug (1132837) was mentioned in
https://build.opensuse.org/request/show/805287 Factory / php7
Comment 34 OBSbugzilla Bot 2023-10-26 10:35:38 UTC
This is an autogenerated message for OBS integration:
This bug (1132837) was mentioned in
https://build.opensuse.org/request/show/1120490 Backports:SLE-15-SP5 / php81