Bug 1271005 - libxml2: incorrect handling of XPath function arguments in error case
libxml2: incorrect handling of XPath function arguments in error case
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libxml2 (Show other bugs)
7.1
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Daniel Veillard
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-12 17:29 EDT by Tomas Hoger
Modified: 2017-10-03 21:16 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Hoger 2015-10-12 17:29:28 EDT
Description of problem:

See upstream commit:

https://git.gnome.org/browse/libxml2/commit/?id=03c6723043775122313f107695066e5744189a08

A malformed XSLT can cause XPath code in libxml2 to mishandle function argument stack and cause valuePop() to unexpectedly return NULL, possibly leading to crash.

Steps to Reproduce:

Reproducer taken from:

https://mail.gnome.org/archives/xslt/2013-December/msg00006.html

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- xsl:output method="text" indent="no"/ -->
<xsl:template match="*">
<xsl:value-of select="generate-id()=generate-id(key('none', $nonexistent))"/>
</xsl:template>
</xsl:stylesheet>

Crash can be reproduced with xsltproc as: xsltproc bad.xsl bad.xsl (the XSL file is also specified as XML file to transform, but other XML input would do).  This also was the cause of PHP bug 1260711.

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