Bug 2136288 (CVE-2022-40304)

Summary: CVE-2022-40304 libxml2: dict corruption caused by entity reference cycles
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: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: adudiak, bdettelb, caswilli, csutherl, dffrench, dhalasz, dking, dkuc, fjansen, gzaronik, hartsjc, jburrell, jclere, jkoehler, jwong, jwon, kaycoth, kshier, micjohns, mturk, ngough, ohudlick, peholase, pjindal, plodge, psegedy, rgodfrey, rh-spice-bugs, stcannon, sthirugn, szappis, tcarlin, tfister, tkasparek, tmeszaro, tsasak, veillard, vkrizan, vkumar, vmugicag
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libxml2 2.10.3 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in libxml2. When a reference cycle is detected in the XML entity cleanup function the XML entity data can be stored in a dictionary. In this case, the dictionary becomes corrupted resulting in logic errors, including memory errors like double free.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-28 16:52:14 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: 2136292, 2136293, 2136294, 2136295, 2136301, 2136567, 2136568, 2136569, 2136570, 2136571    
Bug Blocks: 2135075, 2169449    

Description Guilherme de Almeida Suckevicz 2022-10-19 20:22:28 UTC
A flaw was found in libxml2. When a reference cycle is detected in the XML entity cleanup function the XML entity data can be stored in a dictionary. In this case, the dictionary becomes corrupted resulting in logic errors, including memory errors like double free.

Comment 1 Guilherme de Almeida Suckevicz 2022-10-19 20:23:35 UTC
Upstream patch:
https://gitlab.gnome.org/GNOME/libxml2/-/commit/1b41ec4e9433b05bb0376be4725804c54ef1d80b

Comment 2 Guilherme de Almeida Suckevicz 2022-10-19 20:24:47 UTC
Created libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 2136293]


Created mingw-libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 2136294]


Created qt5-qtwebengine tracking bugs for this issue:

Affects: epel-all [bug 2136292]
Affects: fedora-all [bug 2136295]

Comment 3 Guilherme de Almeida Suckevicz 2022-10-19 21:01:17 UTC
Created perl-Alien-Libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 2136301]

Comment 9 errata-xmlrpc 2022-12-08 13:22:38 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

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

Comment 11 errata-xmlrpc 2023-01-16 09:22:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:0173 https://access.redhat.com/errata/RHSA-2023:0173

Comment 12 errata-xmlrpc 2023-01-23 15:21:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:0338 https://access.redhat.com/errata/RHSA-2023:0338

Comment 14 Product Security DevOps Team 2023-01-28 16:52: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-2022-40304

Comment 18 errata-xmlrpc 2024-01-24 16:46:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:0413 https://access.redhat.com/errata/RHSA-2024:0413