Bug 1956522 (CVE-2021-3537)

Summary: CVE-2021-3537 libxml2: NULL pointer dereference when post-validating mixed content parsed in recovery mode
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: csutherl, dking, erik-fedora, fedora, gzaronik, igor.raits, jclere, jwon, kaycoth, krathod, ktietz, mturk, ohudlick, pjindal, rh-spice-bugs, rjones, szappis, tkorbar, veillard, vmugicag
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libxml2 2.9.11 Doc Type: If docs needed, set a value
Doc Text:
A NULL pointer dereference flaw was found in libxml2, where it did not propagate errors while parsing XML mixed content. This flaw causes the application to crash if an untrusted XML document is parsed in recovery mode and post validated. The highest threat from this vulnerability is to system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-29 16:41:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1962063, 1956523, 1956524, 1957282, 1957283, 1957284, 1957285, 1962055, 1962057, 1962058, 1962059, 1962060, 1962061, 1962064, 1962065    
Bug Blocks: 1956531, 1957460    

Description Pedro Sampaio 2021-05-03 20:32:55 UTC
Parsing specially crafted Mixed Content while parsing XML data may lead to invalid data structure being created, as errors were not propagated. This could lead to several NULL Pointer Dereference when post-validating documents parsed in recovery mode. 



References:

https://gitlab.gnome.org/GNOME/libxml2/-/issues/243
https://gitlab.gnome.org/GNOME/libxml2/-/issues/244
https://gitlab.gnome.org/GNOME/libxml2/-/issues/245

Upstream fix:

https://gitlab.gnome.org/GNOME/libxml2/-/commit/babe75030c7f64a37826bb3342317134568bef61

Comment 1 Pedro Sampaio 2021-05-03 20:33:33 UTC
Created libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1956524]


Created mingw-libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1956523]

Comment 3 Cedric Buissart 2021-05-05 11:23:34 UTC
*** Bug 1956525 has been marked as a duplicate of this bug. ***

Comment 4 Cedric Buissart 2021-05-05 11:24:00 UTC
*** Bug 1956528 has been marked as a duplicate of this bug. ***

Comment 6 Cedric Buissart 2021-05-05 14:21:20 UTC
Acknowledgments:

Name: yuawn (NSLab NTU Taiwan)

Comment 9 Cedric Buissart 2021-05-06 07:54:36 UTC
Statement:

For the flaw to be exploitable, the document must be parsed in recovery mode and postvalidated (e.g.: when used in the `xmlling` tool, both `-recover` and `-postvalid` options must be used for the flaw to be exploitable)

Comment 11 errata-xmlrpc 2021-06-29 16:27:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 12 Product Security DevOps Team 2021-06-29 16:41:20 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-3537

Comment 13 errata-xmlrpc 2022-04-20 19:30:33 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

Via RHSA-2022:1390 https://access.redhat.com/errata/RHSA-2022:1390

Comment 14 errata-xmlrpc 2022-04-20 19:42:07 UTC
This issue has been addressed in the following products:

  JBoss Core Services on RHEL 7
  JBoss Core Services for RHEL 8

Via RHSA-2022:1389 https://access.redhat.com/errata/RHSA-2022:1389