Bug 1954225 (CVE-2021-3516) - CVE-2021-3516 libxml2: Use-after-free in xmlEncodeEntitiesInternal() in entities.c
Summary: CVE-2021-3516 libxml2: Use-after-free in xmlEncodeEntitiesInternal() in entit...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-3516
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1954226 1954227 1956968 1956969 1956975 1956976
Blocks: 1952638 1954249
TreeView+ depends on / blocked
 
Reported: 2021-04-27 18:45 UTC by Guilherme de Almeida Suckevicz
Modified: 2022-04-20 19:41 UTC (History)
21 users (show)

Fixed In Version: libxml2 2.9.11
Doc Type: If docs needed, set a value
Doc Text:
There's a flaw in libxml2's xmllint. An attacker who is able to submit a crafted file to be processed by xmllint could trigger a use-after-free. The greatest impact of this flaw is to confidentiality, integrity, and availability.
Clone Of:
Environment:
Last Closed: 2021-06-29 16:40:56 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:2569 0 None None None 2021-06-29 16:27:41 UTC
Red Hat Product Errata RHSA-2022:1389 0 None None None 2022-04-20 19:41:54 UTC
Red Hat Product Errata RHSA-2022:1390 0 None None None 2022-04-20 19:30:26 UTC

Description Guilherme de Almeida Suckevicz 2021-04-27 18:45:30 UTC
An use-after-free was found in xmllint when used with --html and --push options when processing crafted files.

Reference:
https://gitlab.gnome.org/GNOME/libxml2/-/issues/230

Upstream patch:
https://gitlab.gnome.org/GNOME/libxml2/-/commit/1358d157d0bd83be1dfe356a69213df9fac0b539

Comment 1 Guilherme de Almeida Suckevicz 2021-04-27 18:47:45 UTC
Created libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1954227]


Created mingw-libxml2 tracking bugs for this issue:

Affects: fedora-all [bug 1954226]

Comment 3 Guilherme de Almeida Suckevicz 2021-04-30 12:36:41 UTC
Acknowledgments:

Name: zodf0055980 (SQLab NCTU Taiwan)

Comment 7 Todd Cullum 2021-05-04 22:06:51 UTC
Statement:

The only known exploitation path of this flaw is via the xmllint tool.

This flaw is out of support scope for Red Hat Enterprise Linux 6 and 7. To learn more about Red Hat Enterprise Linux support life cycles, please see https://access.redhat.com/support/policy/updates/errata .

Comment 8 Todd Cullum 2021-05-04 22:09:20 UTC
This flaw was caused by xmlCtxtUseOptions() being called on a htmlParserCtxtPtr, rather than htmlCtxtUseOptions().

Comment 9 Todd Cullum 2021-05-04 22:10:16 UTC
Mitigation:

This flaw can be mitigated by not using xmllint with the --html and --push options together.

Comment 11 errata-xmlrpc 2021-06-29 16:27:39 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:40:56 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-3516

Comment 13 errata-xmlrpc 2022-04-20 19:30:24 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:41:51 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


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