CVE-2022-2309: NULL Pointer Dereference allows attackers to cause a denial of service (or application crash)

Bug #1996494 reported by bhs
262
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libxml2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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.

Reference: https://ubuntu.com/security/CVE-2022-2309

Revision history for this message
bhs (bharath-vegito) wrote :
Changed in libxml2 (Ubuntu):
status: New → Confirmed
information type: Private Security → Public Security
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libxml2 - 2.9.14+dfsg-1ubuntu0.1

---------------
libxml2 (2.9.14+dfsg-1ubuntu0.1) kinetic-security; urgency=medium

  * SECURITY UPDATE: NULL pointer dereference
    - debian/patches/CVE-2022-2309.patch: reset nsNr in
      xmlCtxReset in parser.c (LP: #1996494).
    - CVE-2022-2309
  * SECURITY UPDATE: Integer overflow
    - debian/patches/CVE-2022-40303.patch: fix integer overflows
      with XML_PARSE_HUGE in parser.c.
    - CVE-2022-40303
  * SECURITY UPDATE: Double-free
    - debian/patches/CVE-2022-40304.patch: fix dict
      corruption caused by entity ref cycles in
      entities.c.
    - CVE-2022-40304

 -- Leonidas Da Silva Barbosa <email address hidden> Tue, 29 Nov 2022 16:23:02 -0300

Changed in libxml2 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libxml2 - 2.9.13+dfsg-1ubuntu0.2

---------------
libxml2 (2.9.13+dfsg-1ubuntu0.2) jammy-security; urgency=medium

  * SECURITY UPDATE: NULL pointer dereference
    - debian/patches/CVE-2022-2309.patch: reset nsNr in
      xmlCtxReset in parser.c (LP: #1996494).
    - CVE-2022-2309
  * SECURITY UPDATE: Integer overflow
    - debian/patches/CVE-2022-40303.patch: fix integer overflows
      with XML_PARSE_HUGE in parser.c.
    - CVE-2022-40303
  * SECURITY UPDATE: Double-free
    - debian/patches/CVE-2022-40304.patch: fix dict
      corruption caused by entity ref cycles in
      entities.c.
    - CVE-2022-40304

 -- Leonidas Da Silva Barbosa <email address hidden> Tue, 29 Nov 2022 16:39:07 -0300

Changed in libxml2 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libxml2 - 2.9.10+dfsg-5ubuntu0.20.04.5

---------------
libxml2 (2.9.10+dfsg-5ubuntu0.20.04.5) focal-security; urgency=medium

  * SECURITY UPDATE: NULL pointer dereference
    - debian/patches/CVE-2022-2309.patch: reset nsNr in
      xmlCtxReset in parser.c (LP: #1996494).
    - CVE-2022-2309
  * SECURITY UPDATE: Integer overflow
    - debian/patches/CVE-2022-40303.patch: fix integer overflows
      with XML_PARSE_HUGE in parser.c.
    - CVE-2022-40303
  * SECURITY UPDATE: Double-free
    - debian/patches/CVE-2022-40304.patch: fix dict
      corruption caused by entity ref cycles in
      entities.c.
    - CVE-2022-40304

 -- Leonidas Da Silva Barbosa <email address hidden> Wed, 30 Nov 2022 09:53:52 -0300

Changed in libxml2 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
bhs (bharath-vegito) wrote :

Thanks a lot for the fixes.

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.