Bug 2107571 (CVE-2022-2309)

Summary: CVE-2022-2309 lxml: NULL Pointer Dereference in lxml
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cstratak, hhorak, jorton, lbalhar, me, mizdebsk, python-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A NULL Pointer dereference vulnerability found in lxml, caused by the iterwalk function (also used by the canonicalize function). This flaw can lead to a crash when the incorrect parser input occurs together with usages.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-06 09:03:03 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: 2108457, 2108458, 2108459, 2108460, 2108461, 2108462, 2108463    
Bug Blocks: 2104640    

Description Avinash Hanwate 2022-07-15 12:38:12 UTC
NULL Pointer Dereference allows attackers to cause a denial of service (or application crash). This only applies when lxml is used together with libxml2 2.9.10 through 2.9.14. libxml2 2.9.9 and earlier are not affected. It allows triggering crashes through forged input data, given a vulnerable code sequence in the application. The vulnerability is caused by the iterwalk function (also used by the canonicalize function). Such code shouldn't be in wide-spread use, given that parsing + iterwalk would usually be replaced with the more efficient iterparse function. However, an XML converter that serialises to C14N would also be vulnerable, for example, and there are legitimate use cases for this code sequence. If untrusted input is received (also remotely) and processed via iterwalk function, a crash can be triggered.

https://huntr.dev/bounties/8264e74f-edda-4c40-9956-49de635105ba
https://github.com/lxml/lxml/commit/86368e9cf70a0ad23cccd5ee32de847149af0c6f

Comment 1 Sandipan Roy 2022-07-19 06:06:22 UTC
Created python-lxml tracking bugs for this issue:

Affects: fedora-all [bug 2108457]

Comment 9 errata-xmlrpc 2022-11-15 10:38:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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

Comment 10 Product Security DevOps Team 2022-12-06 09:03:00 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-2309