Bug 1639116 (CVE-2018-17847)

Summary: CVE-2018-17847 golang-org-x-net-html: index out of range in (*nodeStack).pop in node.go causes runtime panic during html.Parse() call
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: admiller, ahardin, apevec, bleanhar, bmontgom, bodavis, ccoleman, chrisw, dedgar, dustymabe, eparis, extras-orphan, fpokorny, hchiramm, jarrpa, jburrell, jcajka, jchaloup, jgoulding, jjoyce, jmulligan, jokerman, jpadman, jschluet, kramdoss, kumarpraveen.nitdgp, lhh, lpabon, lpeer, madam, markmc, mburns, mchappel, mmagr, mnewsome, nstielau, ramkrsna, rbryant, rhs-bugs, sclewis, sisharma, slinaber, slong, sponnaga, tdawson, tdecacqu, thrcka
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-25 22:19:41 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: 1639117, 1639118, 1639119, 1639120, 1639121, 1639122, 1651083, 1668984    
Bug Blocks: 1633033    

Description Sam Fowler 2018-10-15 06:10:02 UTC
The html package (aka x/net/html) through 2018-09-25 in Go mishandles <svg><template><desc><t><svg></template>, leading to a "panic: runtime error" (index out of range) in (*nodeStack).pop in node.go, called from (*parser).clearActiveFormattingElements, during an html.Parse call.


Upstream Issue:

https://github.com/golang/go/issues/27846

Comment 1 Sam Fowler 2018-10-15 06:13:03 UTC
Created golang-googlecode-net tracking bugs for this issue:

Affects: epel-6 [bug 1639122]
Affects: fedora-all [bug 1639121]


Created heketi tracking bugs for this issue:

Affects: epel-6 [bug 1639120]
Affects: fedora-all [bug 1639119]


Created kompose tracking bugs for this issue:

Affects: fedora-all [bug 1639118]


Created origin tracking bugs for this issue:

Affects: fedora-all [bug 1639117]

Comment 2 Scott Gayou 2018-10-16 21:54:44 UTC
No upstream fix found yet, but this is not reproducible on RHEL7. My guess is this is similar to the other template related flaws.

See https://bugzilla.redhat.com/show_bug.cgi?id=1633022 as an example.

Not affected / not reproducible on our released version.

Comment 3 Summer Long 2018-10-30 04:37:36 UTC
OpenStack OpTools 8 and 9 grafana versions do not include net/html, which has the flawed code, setting these to NotAffected.

Comment 8 Joshua Padman 2019-08-21 02:27:06 UTC
Kompose was in DevTools as part of devsuite. Devsuite is now retired (https://developers.redhat.com/products/devsuite/overview/)

Comment 9 Riccardo Schirone 2019-11-27 08:19:18 UTC
Upstream fix:
https://github.com/golang/net/commit/4b62a64f59f73840b9ab79204c94fee61cd1ba2c