Bug 1925272 (CVE-2021-21702)

Summary: CVE-2021-21702 php: NULL pointer dereference in SoapClient
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fedora, hhorak, jorton, rcollet
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-03 13:07:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1925273, 1930624, 1930625, 1930626, 1930627, 1977769    
Bug Blocks: 1925275    

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.


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:

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

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):


Comment 9 errata-xmlrpc 2021-11-09 17:45:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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