Bug 1685412 (CVE-2019-9022) - CVE-2019-9022 php: memcpy with negative length via crafted DNS response
Summary: CVE-2019-9022 php: memcpy with negative length via crafted DNS response
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-9022
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1709137 1709138 1709139 1709140
Blocks: 1680558
TreeView+ depends on / blocked
 
Reported: 2019-03-05 07:04 UTC by Dhananjay Arunesh
Modified: 2023-03-24 14:36 UTC (History)
6 users (show)

Fixed In Version: php 7.1.26, php 7.2.14, php 7.3.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 08:47:48 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3727 0 None None None 2019-11-06 10:12:34 UTC
Red Hat Product Errata RHSA-2019:2519 0 None None None 2019-08-19 08:42:53 UTC
Red Hat Product Errata RHSA-2019:3299 0 None None None 2019-11-01 13:00:49 UTC
Red Hat Product Errata RHSA-2020:1624 0 None None None 2020-04-28 15:31:47 UTC

Description Dhananjay Arunesh 2019-03-05 07:04:30 UTC
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.

Upstream commit:
http://git.php.net/?p=php-src.git;a=commit;h=8d3dfabef459fe7815e8ea2fd68753fd17859d7b

Reference:
https://bugs.php.net/bug.php?id=77369

Comment 1 Huzaifa S. Sidhpurwala 2019-05-13 05:28:03 UTC
Analysis:

A malicious, possibly MITM DNS server can send a crafted rely when called by PHP via dns_get_record(). The record needs to be of the type DNS_CAA or DNS_ANY. This can result in OOB read and crash.

Comment 3 errata-xmlrpc 2019-08-19 08:42:52 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2019:2519 https://access.redhat.com/errata/RHSA-2019:2519

Comment 4 Product Security DevOps Team 2019-08-19 08:47:48 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-9022

Comment 5 errata-xmlrpc 2019-11-01 13:00:48 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2019:3299 https://access.redhat.com/errata/RHSA-2019:3299

Comment 6 errata-xmlrpc 2020-04-28 15:31:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:1624 https://access.redhat.com/errata/RHSA-2020:1624


Note You need to log in before you can comment on or make changes to this bug.