Bug 1633022 (CVE-2018-17142)

Summary: CVE-2018-17142 golang-org-x-net-html: Runtime panic in html.Parse() via crafted html
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: admiller, ahardin, apevec, bleanhar, bmontgom, ccoleman, chrisw, dedgar, dustymabe, eparis, extras-orphan, fpokorny, hchiramm, jarrpa, jburrell, jcajka, jchaloup, jgoulding, jjoyce, jmulligan, jokerman, jschluet, kbasil, kramdoss, kumarpraveen.nitdgp, lhh, lpabon, lpeer, madam, markmc, mburns, mchappel, mmagr, nstielau, ramkrsna, rbryant, rhs-bugs, sankarshan, sclewis, sisharma, slinaber, sponnaga, ssaha, storage-qa-internal, tdawson, tdecacqu, thrcka, vbatts, vbellur
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: 2019-06-10 10:38:48 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: 1633023, 1633024, 1633025, 1633026, 1633036, 1633041, 1639104, 1639105    
Bug Blocks: 1633033    

Description Sam Fowler 2018-09-26 05:34:54 UTC
The html package (aka x/net/html) through 2018-09-17 in Go mishandles <math><template><mo><template>, leading to a "panic: runtime error" in parseCurrentToken in parse.go during an html.Parse call.


Upstream Issue:

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

Comment 1 Sam Fowler 2018-09-26 05:36:41 UTC
Created heketi tracking bugs for this issue:

Affects: epel-6 [bug 1633026]
Affects: fedora-all [bug 1633025]


Created kompose tracking bugs for this issue:

Affects: fedora-all [bug 1633024]


Created origin tracking bugs for this issue:

Affects: fedora-all [bug 1633023]

Comment 2 Siddharth Sharma 2018-10-11 10:43:27 UTC
upstream fix:

https://github.com/golang/net/commit/cf3bd585ca2a5a21b057abd8be7eea2204af89d0

Comment 3 Sam Fowler 2018-10-15 05:40:31 UTC
Created golang-googlecode-net tracking bugs for this issue:

Affects: epel-6 [bug 1639105]
Affects: fedora-all [bug 1639104]

Comment 4 Scott Gayou 2018-10-16 21:02:29 UTC
Version packaged by RHEL (around 2014) does not seem to include the template functionality. Vulnerable behavior looks to have been introduced here, in 2017: https://github.com/golang/net/commit/500e7a4f953ddaf55d316b4d3adc516aa0379622

Reproducer does not trigger an exception.

Comment 5 Summer Long 2018-10-19 06:19:09 UTC
OpenStack OpTools 8/9 grafana versions do not include net/html, which includes the flawed code. OpenStack OpTools golang-googecode-net 9 does have the code, but this version does not support templates (which is needed for flaw exploitation).