Bugzilla – Bug 1128883
VUL-1: CVE-2019-9640: php5,php72,php7,php53: php7.0 -- security update
Last modified: 2023-10-26 10:35:34 UTC
CVE-2019-9640 Multiple security issues were found in PHP, a widely-used open source general purpose scripting language: The EXIF extension had multiple cases of invalid memory access and rename() was implemented insecurely. For the stable distribution (stretch), this problem has been fixed in version 7.0.33-0+deb9u3. We recommend that you upgrade your php7.0 packages. For the detailed security status of php7.0 please refer to its security tracker page at: \ https://security-tracker.debian.org/tracker/php7.0 References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-9640 http://www.debian.org/security/2019/dsa-4403 https://bugs.php.net/bug.php?id=77540
Upstream issue: https://bugs.php.net/bug.php?id=77540
BEFORE 15/php7 $ USE_ZEND_ALLOC=0 valgrind -q php test.php [..] ==7561== Invalid read of size 2 ==7561== at 0x729865D: exif_scan_thumbnail (exif.c:2659) ==7561== by 0x729F15A: zif_exif_thumbnail (exif.c:4681) ==7561== by 0x7C0423: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617) ==7561== by 0x7C0423: execute_ex (zend_vm_execute.h:59734) ==7561== by 0x7CB087: zend_execute (zend_vm_execute.h:63760) ==7561== by 0x6FF41F: zend_execute_scripts (zend.c:1496) ==7561== by 0x68D42F: php_execute_script (main.c:2590) ==7561== by 0x7CDAC7: do_cli (php_cli.c:1011) ==7561== by 0x50F79A: main (php_cli.c:1404) ==7561== Address 0x71a1169 is 3 bytes after a block of size 6 alloc'd ==7561== at 0x4C2E01F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7561== by 0x6CA818: __zend_malloc (zend_alloc.c:2829) ==7561== by 0x6D289A: _estrndup (zend_alloc.c:2537) ==7561== by 0x729CAAF: exif_process_IFD_in_JPEG (exif.c:2951) ==7561== by 0x729D4B9: exif_read_from_stream.constprop.16 (exif.c:3669) ==7561== by 0x729F098: zif_exif_thumbnail (exif.c:4413) ==7561== by 0x7C0423: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617) ==7561== by 0x7C0423: execute_ex (zend_vm_execute.h:59734) ==7561== by 0x7CB087: zend_execute (zend_vm_execute.h:63760) ==7561== by 0x6FF41F: zend_execute_scripts (zend.c:1496) ==7561== by 0x68D42F: php_execute_script (main.c:2590) ==7561== by 0x7CDAC7: do_cli (php_cli.c:1011) ==7561== by 0x50F79A: main (php_cli.c:1404) ==7561== ==7561== Invalid read of size 2 ==7561== at 0x7298672: exif_scan_thumbnail (exif.c:2658) ==7561== by 0x729F15A: zif_exif_thumbnail (exif.c:4681) ==7561== by 0x7C0423: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617) ==7561== by 0x7C0423: execute_ex (zend_vm_execute.h:59734) ==7561== by 0x7CB087: zend_execute (zend_vm_execute.h:63760) ==7561== by 0x6FF41F: zend_execute_scripts (zend.c:1496) ==7561== by 0x68D42F: php_execute_script (main.c:2590) ==7561== by 0x7CDAC7: do_cli (php_cli.c:1011) ==7561== by 0x50F79A: main (php_cli.c:1404) ==7561== Address 0x71a1167 is 1 bytes after a block of size 6 alloc'd ==7561== at 0x4C2E01F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7561== by 0x6CA818: __zend_malloc (zend_alloc.c:2829) ==7561== by 0x6D289A: _estrndup (zend_alloc.c:2537) ==7561== by 0x729CAAF: exif_process_IFD_in_JPEG (exif.c:2951) ==7561== by 0x729D4B9: exif_read_from_stream.constprop.16 (exif.c:3669) ==7561== by 0x729F098: zif_exif_thumbnail (exif.c:4413) ==7561== by 0x7C0423: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617) ==7561== by 0x7C0423: execute_ex (zend_vm_execute.h:59734) ==7561== by 0x7CB087: zend_execute (zend_vm_execute.h:63760) ==7561== by 0x6FF41F: zend_execute_scripts (zend.c:1496) ==7561== by 0x68D42F: php_execute_script (main.c:2590) ==7561== by 0x7CDAC7: do_cli (php_cli.c:1011) ==7561== by 0x50F79A: main (php_cli.c:1404) ==7561== Width 0<br>Height 0$ 12/php7, 12/php5, 11sp3/php53, 11/php5 $ USE_ZEND_ALLOC=0 valgrind -q php test.php ==7628== Invalid read of size 1 ==7628== at 0x6F5DBB8: php_jpg_get16 (exif.c:1068) ==7628== by 0x6F5DBB8: exif_process_SOFn (exif.c:2247) ==7628== by 0x6F5DBB8: exif_scan_thumbnail (exif.c:3522) ==7628== by 0x6F64E27: zif_exif_thumbnail (exif.c:4166) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== Address 0x6d8d559 is 3 bytes after a block of size 6 alloc'd ==7628== at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7628== by 0x36BCCA: _estrndup (zend_alloc.c:2573) ==7628== by 0x6F619FC: exif_thumbnail_extract (exif.c:2539) ==7628== by 0x6F619FC: exif_process_IFD_in_JPEG (exif.c:3197) ==7628== by 0x6F64AE0: exif_process_TIFF_in_JPEG (exif.c:3243) ==7628== by 0x6F64AE0: exif_process_APP1 (exif.c:3268) ==7628== by 0x6F64AE0: exif_scan_JPEG_header (exif.c:3413) ==7628== by 0x6F64AE0: exif_scan_FILE_header (exif.c:3798) ==7628== by 0x6F64AE0: exif_read_file.constprop.15 (exif.c:3940) ==7628== by 0x6F64CDB: zif_exif_thumbnail (exif.c:4145) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== ==7628== Invalid read of size 1 ==7628== at 0x6F5DBBC: php_jpg_get16 (exif.c:1068) ==7628== by 0x6F5DBBC: exif_process_SOFn (exif.c:2247) ==7628== by 0x6F5DBBC: exif_scan_thumbnail (exif.c:3522) ==7628== by 0x6F64E27: zif_exif_thumbnail (exif.c:4166) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== Address 0x6d8d55a is 4 bytes after a block of size 6 alloc'd ==7628== at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7628== by 0x36BCCA: _estrndup (zend_alloc.c:2573) ==7628== by 0x6F619FC: exif_thumbnail_extract (exif.c:2539) ==7628== by 0x6F619FC: exif_process_IFD_in_JPEG (exif.c:3197) ==7628== by 0x6F64AE0: exif_process_TIFF_in_JPEG (exif.c:3243) ==7628== by 0x6F64AE0: exif_process_APP1 (exif.c:3268) ==7628== by 0x6F64AE0: exif_scan_JPEG_header (exif.c:3413) ==7628== by 0x6F64AE0: exif_scan_FILE_header (exif.c:3798) ==7628== by 0x6F64AE0: exif_read_file.constprop.15 (exif.c:3940) ==7628== by 0x6F64CDB: zif_exif_thumbnail (exif.c:4145) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== ==7628== Invalid read of size 1 ==7628== at 0x6F5DBCD: php_jpg_get16 (exif.c:1068) ==7628== by 0x6F5DBCD: exif_process_SOFn (exif.c:2246) ==7628== by 0x6F5DBCD: exif_scan_thumbnail (exif.c:3522) ==7628== by 0x6F64E27: zif_exif_thumbnail (exif.c:4166) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== Address 0x6d8d557 is 1 bytes after a block of size 6 alloc'd ==7628== at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7628== by 0x36BCCA: _estrndup (zend_alloc.c:2573) ==7628== by 0x6F619FC: exif_thumbnail_extract (exif.c:2539) ==7628== by 0x6F619FC: exif_process_IFD_in_JPEG (exif.c:3197) ==7628== by 0x6F64AE0: exif_process_TIFF_in_JPEG (exif.c:3243) ==7628== by 0x6F64AE0: exif_process_APP1 (exif.c:3268) ==7628== by 0x6F64AE0: exif_scan_JPEG_header (exif.c:3413) ==7628== by 0x6F64AE0: exif_scan_FILE_header (exif.c:3798) ==7628== by 0x6F64AE0: exif_read_file.constprop.15 (exif.c:3940) ==7628== by 0x6F64CDB: zif_exif_thumbnail (exif.c:4145) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== ==7628== Invalid read of size 1 ==7628== at 0x6F5DBD1: php_jpg_get16 (exif.c:1068) ==7628== by 0x6F5DBD1: exif_process_SOFn (exif.c:2246) ==7628== by 0x6F5DBD1: exif_scan_thumbnail (exif.c:3522) ==7628== by 0x6F64E27: zif_exif_thumbnail (exif.c:4166) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== Address 0x6d8d558 is 2 bytes after a block of size 6 alloc'd ==7628== at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7628== by 0x36BCCA: _estrndup (zend_alloc.c:2573) ==7628== by 0x6F619FC: exif_thumbnail_extract (exif.c:2539) ==7628== by 0x6F619FC: exif_process_IFD_in_JPEG (exif.c:3197) ==7628== by 0x6F64AE0: exif_process_TIFF_in_JPEG (exif.c:3243) ==7628== by 0x6F64AE0: exif_process_APP1 (exif.c:3268) ==7628== by 0x6F64AE0: exif_scan_JPEG_header (exif.c:3413) ==7628== by 0x6F64AE0: exif_scan_FILE_header (exif.c:3798) ==7628== by 0x6F64AE0: exif_read_file.constprop.15 (exif.c:3940) ==7628== by 0x6F64CDB: zif_exif_thumbnail (exif.c:4145) ==7628== by 0x3E32BC: ZEND_DO_ICALL_SPEC_HANDLER (zend_vm_execute.h:586) ==7628== by 0x3D5FAA: execute_ex (zend_vm_execute.h:414) ==7628== by 0x431FE2: zend_execute (zend_vm_execute.h:458) ==7628== by 0x392E8F: zend_execute_scripts (zend.c:1427) ==7628== by 0x32B28F: php_execute_script (main.c:2494) ==7628== by 0x433D87: do_cli (php_cli.c:974) ==7628== by 0x1DE05A: main (php_cli.c:1344) ==7628== Width 0<br>Height 0$ PATCH http://git.php.net/?p=php-src.git;a=commit;h=5f0e62a3e5b525163e538aaab0161c2c8c5d057b Applicable to all codestreams. AFTER 15/php7, 12/php7, 12/php5, 11sp3/php53, 11/php5 $ USE_ZEND_ALLOC=0 valgrind -q php test.php Width 0<br>Height 0$
Will submit for: 15/php7, 12/php72, 12/php7, 12/php5, 11sp3/php53, 11/php5 and 10sp3/php5.
Also fixed in devel:languages:php:php56.
I believe all fixed.
An update workflow for this issue was started. This issue was rated as low. Please submit fixed packages until 2019-04-18. When done, reassign the bug to security-team@suse.de. https://swamp.suse.de/webswamp/wf/64240
ETOOMUCHCODESTREAMS I would say. Please do not set NEEDINFO when you are reassigning the bug back. Package submitted.
.
SUSE-SU-2019:14013-1: An update that fixes 11 vulnerabilities is now available. Category: security (moderate) Bug References: 1126711,1126713,1126821,1126823,1127122,1128722,1128883,1128886,1128887,1128889,1128892 CVE References: CVE-2018-20783,CVE-2019-9020,CVE-2019-9021,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 Software Development Kit 11-SP4 (src): php53-5.3.17-112.58.1 SUSE Linux Enterprise Server 11-SP4 (src): php53-5.3.17-112.58.1 SUSE Linux Enterprise Point of Sale 11-SP3 (src): php53-5.3.17-112.58.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): php53-5.3.17-112.58.1 *** NOTE: This information is not intended to be used for external communication, because this may only be a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2019:0988-1: An update that fixes 5 vulnerabilities is now available. Category: security (moderate) Bug References: 1128883,1128886,1128887,1128889,1128892 CVE References: 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): php72-7.2.5-1.10.1 SUSE Linux Enterprise Software Development Kit 12-SP3 (src): php72-7.2.5-1.10.1 SUSE Linux Enterprise Module for Web Scripting 12 (src): php72-7.2.5-1.10.1 *** NOTE: This information is not intended to be used for external communication, because this may only be a partial fix. If you have questions please reach out to maintenance coordination.
openSUSE-SU-2019:1293-1: An update that solves 11 vulnerabilities and has one errata is now available. Category: security (moderate) Bug References: 1126711,1126713,1126821,1126823,1127122,1128722,1128883,1128886,1128887,1128889,1128892,1129032 CVE References: CVE-2018-20783,CVE-2019-9020,CVE-2019-9021,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 42.3 (src): php7-7.0.7-58.1
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.
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
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.
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
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
This is an autogenerated message for OBS integration: This bug (1128883) was mentioned in https://build.opensuse.org/request/show/802846 Factory / php7
This is an autogenerated message for OBS integration: This bug (1128883) was mentioned in https://build.opensuse.org/request/show/802978 Factory / php7
This is an autogenerated message for OBS integration: This bug (1128883) was mentioned in https://build.opensuse.org/request/show/804946 Factory / php7
This is an autogenerated message for OBS integration: This bug (1128883) was mentioned in https://build.opensuse.org/request/show/805287 Factory / php7
Done
This is an autogenerated message for OBS integration: This bug (1128883) was mentioned in https://build.opensuse.org/request/show/1120490 Backports:SLE-15-SP5 / php81