Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594614 - <dev-perl/XML-LibXML-2.12.800-r1: Expanding external entities by default
Summary: <dev-perl/XML-LibXML-2.12.800-r1: Expanding external entities by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Security
URL: https://rt.cpan.org/Public/Bug/Displa...
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-21 12:23 UTC by Agostino Sarubbo
Modified: 2019-10-17 10:22 UTC (History)
2 users (show)

See Also:
Package list:
dev-perl/XML-LibXML-2.12.800-r1
Runtime testing required: ---
stable-bot: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2016-09-21 12:23:41 UTC
From ${URL} :

It was found that XML::LibXML is vulnerable to XXE attack as it has enabled external entity loading by default.

Bug report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838097



@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2016-12-30 16:42:18 UTC
commit 6ab4da0dccbc2a77285e0c200d2ee3df58249ec6
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Fri Dec 30 17:40:18 2016 +0100

    dev-perl/XML-LibXML: Disable expanding external entities by default, bug 594614
    
    Patch by ppisar@redhat.com
    https://rt.cpan.org/Public/Bug/Display.html?id=118032
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838097
    https://bugzilla.redhat.com/show_bug.cgi?id=1377996
    
    Package-Manager: Portage-2.3.3, Repoman-2.3.1



Let's wait a bit how much this makes explode...
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2017-03-11 22:08:21 UTC
Arches please stabilize dev-perl/XML-LibXML-2.12.800-r1
Target: all stable arches
Comment 3 Michael Weber (RETIRED) gentoo-dev 2017-03-12 00:20:48 UTC
arm arm64 ppc ppc64 stable
Comment 4 Agostino Sarubbo gentoo-dev 2017-03-13 12:58:42 UTC
amd64 stable
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2017-03-14 16:25:13 UTC
Stable for HPPA.
Comment 6 Agostino Sarubbo gentoo-dev 2017-03-17 10:27:01 UTC
x86 stable
Comment 7 Agostino Sarubbo gentoo-dev 2017-03-17 10:42:53 UTC
sparc stable
Comment 8 Tobias Klausmann (RETIRED) gentoo-dev 2017-04-04 19:33:15 UTC
Stable on alpha.
Comment 9 Yury German Gentoo Infrastructure gentoo-dev 2017-04-05 05:22:36 UTC
Arches, Thank you for your work.
GLSA Vote: No - NO GLSA will be issued (Setting noglsa)

ia64 not a security supported arch.
Maintainer(s), please drop the vulnerable version(s).
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2017-06-05 08:25:59 UTC
ia64 stable

Last arch is done.
Comment 11 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-06-05 11:15:14 UTC
commit:  2ec47ab7d89df6b0c138426c9c861ad184b758be
author:  2017-06-05 23:14:00 +1200 Kent Fredric <kentnl@gentoo.org>
commit:  2017-06-05 23:14:12 +1200 Kent Fredric <kentnl@gentoo.org>
gpg-key: E854324B1366A820

    dev-perl/XML-LibXML: Cleanup old re bug #594614

    Removing old versions affected by XXE
    
    Buyg: https://bugs.gentoo.org/594614
    Package-Manager: Portage-2.3.5, Repoman-2.3.2


 dev-perl/XML-LibXML/Manifest                   |  2 -
 dev-perl/XML-LibXML/XML-LibXML-2.12.100.ebuild | 62 ----
 dev-perl/XML-LibXML/XML-LibXML-2.12.600.ebuild | 65 -----
 dev-perl/XML-LibXML/XML-LibXML-2.12.800.ebuild | 65 -----
 4 files changed, 194 deletions(-)
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2017-06-08 21:14:52 UTC
Repository is clean, all done.
Comment 13 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-03-29 02:48:38 UTC
It seems this issue may have been fixed inappropriately.

The fix stated and applied seems to prohibit decoding entities entirely (eg: &#38;), not merely rejecting loading of external entities.

The documentation also says flipping expand_entities is wrong, because:

https://metacpan.org/pod/distribution/XML-LibXML/lib/XML/LibXML/Parser.pod#expand_entities

> Note that although this flag disables entity substitution, it does not
> prevent the parser from loading external entities; 
> when substitution of an external entity is disabled, the entity will be
> represented in the document tree by an XML_ENTITY_REF_NODE node whose subtree
> will be the content obtained by parsing the external resource; Although this
> nesting is visible from the DOM it is transparent to XPath data model,
> so it is possible to match nodes in an unexpanded entity by the same XPath
> expression as if the entity were expanded. See also ext_ent_handler.

Redhat also have closed this as "wontfix"

Please advise.
Comment 14 Andreas K. Hüttel archtester gentoo-dev 2019-10-11 19:32:17 UTC
Reopening so comment 13 gets some attention
Comment 15 Andreas K. Hüttel archtester gentoo-dev 2019-10-17 10:22:18 UTC
(In reply to Andreas K. Hüttel from comment #14)
> Reopening so comment 13 gets some attention

Closing again, since these versions are gone anyway. Sorry for the noise.