Bug 1925272 (CVE-2021-21702) - CVE-2021-21702 php: NULL pointer dereference in SoapClient
Summary: CVE-2021-21702 php: NULL pointer dereference in SoapClient
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-21702
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: 1930626 1925273 1930624 1930625 1930627 1977769
Blocks: 1925275
TreeView+ depends on / blocked
 
Reported: 2021-02-04 18:10 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-09-28 18:30 UTC (History)
4 users (show)

Fixed In Version: php 7.3.27, php 8.0.2
Doc Type: If docs needed, set a value
Doc Text:
A NULL pointer dereference issue is in the SOAP extension of PHP. More specifically, the flaw occurs in the SoapClient when parsing a WSDL document due to improper checking of a child node name. A malicious or compromised server replies with a crafted WSDL document, leading to a denial of service of the SoapClient accessing said document. The highest threat from this vulnerability is to system availability.
Clone Of:
Environment:
Last Closed: 2021-08-03 13:07:10 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:2992 0 None None None 2021-08-03 09:15:57 UTC

Description Guilherme de Almeida Suckevicz 2021-02-04 18:10:49 UTC
Missing check in node_is_equal_ex function in ext/soap/php_xml.c leads to a NULL pointer dereference.

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

Comment 1 Guilherme de Almeida Suckevicz 2021-02-04 18:11:03 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1925273]

Comment 2 Mauro Matteo Cascella 2021-02-19 09:43:24 UTC
Upstream fix:
http://git.php.net/?p=php-src.git;a=commit;h=3c939e3f69955d087e0bb671868f7267dfb2a502

Comment 4 Mauro Matteo Cascella 2021-03-05 13:29:02 UTC
Statement:

This flaw has been rated as having a security impact of Low, because it requires a malicious or compromised server in order to be exploited, and it only affects the SOAP client.

Comment 6 Mauro Matteo Cascella 2021-03-05 14:23:44 UTC
While parsing a WSDL document via load_wsdl(), SoapClient ended up calling node_is_equal_ex() with a NULL node name. The node_is_equal_ex() function compares the name of an xmlNode with an argument string: `strcmp((char*)node->name, name)`. This could result in a NULL pointer dereference in strcmp() when node->name is NULL:

==28500== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==28500==  Access not within mapped region at address 0x0
==28500==    at 0x4C353B4: strcmp (vg_replace_strmem.c:849)
==28500==    by 0x19AFC66D: node_is_equal_ex (php_xml.c:223)
==28500==    by 0x19AF8625: load_wsdl_ex (php_sdl.c:370)
==28500==    by 0x19AF8B6D: load_wsdl (php_sdl.c:741)
==28500==    by 0x19AF9E88: get_sdl (php_sdl.c:3313)

Comment 7 errata-xmlrpc 2021-08-03 09:15:55 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.7 EUS

Via RHSA-2021:2992 https://access.redhat.com/errata/RHSA-2021:2992

Comment 8 Product Security DevOps Team 2021-08-03 13:07:10 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-2021-21702


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